about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-11-26 20:35:38 -0500
committerGitHub <noreply@github.com>2024-11-26 20:35:38 -0500
commit8a2f57f0c463ff9191184fe884df3fd19583b18b (patch)
tree2af781604695454cafb35e2f4d94c34dd98088f8
parentf1015629808f21b166f0991a52633a59e29d3510 (diff)
parentbd44b632a84030138a5f0133fa2ae7ad30fe8266 (diff)
downloadrust-8a2f57f0c463ff9191184fe884df3fd19583b18b.tar.gz
rust-8a2f57f0c463ff9191184fe884df3fd19583b18b.zip
Rollup merge of #133402 - compiler-errors:drop-and-destruct, r=lcnr
Constify `Drop` and `Destruct`

r? `@lcnr` or `@fee1-dead`
-rw-r--r--library/core/src/marker.rs1
-rw-r--r--library/core/src/ops/drop.rs2
-rw-r--r--tests/ui/consts/const-block-const-bound.stderr28
-rw-r--r--tests/ui/consts/fn_trait_refs.stderr126
-rw-r--r--tests/ui/consts/promoted-const-drop.rs1
-rw-r--r--tests/ui/consts/promoted-const-drop.stderr15
-rw-r--r--tests/ui/consts/promoted_const_call.stderr11
-rw-r--r--tests/ui/dropck/const_drop_is_valid.rs8
-rw-r--r--tests/ui/dropck/const_drop_is_valid.stderr31
-rw-r--r--tests/ui/impl-trait/normalize-tait-in-const.stderr29
-rw-r--r--tests/ui/traits/const-traits/const-drop-bound.stderr56
-rw-r--r--tests/ui/traits/const-traits/const-drop-fail-2.precise.stderr33
-rw-r--r--tests/ui/traits/const-traits/const-drop-fail-2.rs11
-rw-r--r--tests/ui/traits/const-traits/const-drop-fail-2.stderr41
-rw-r--r--tests/ui/traits/const-traits/const-drop-fail-2.stock.stderr33
-rw-r--r--tests/ui/traits/const-traits/const-drop-fail.precise.stderr69
-rw-r--r--tests/ui/traits/const-traits/const-drop-fail.rs6
-rw-r--r--tests/ui/traits/const-traits/const-drop-fail.stock.stderr50
-rw-r--r--tests/ui/traits/const-traits/const-drop.precise.stderr100
-rw-r--r--tests/ui/traits/const-traits/const-drop.rs7
-rw-r--r--tests/ui/traits/const-traits/const-drop.stock.stderr100
-rw-r--r--tests/ui/traits/const-traits/issue-92111.rs5
-rw-r--r--tests/ui/traits/const-traits/issue-92111.stderr25
23 files changed, 113 insertions, 675 deletions
diff --git a/library/core/src/marker.rs b/library/core/src/marker.rs
index acbad07746b..1620b949590 100644
--- a/library/core/src/marker.rs
+++ b/library/core/src/marker.rs
@@ -957,6 +957,7 @@ marker_impls! {
 #[lang = "destruct"]
 #[rustc_on_unimplemented(message = "can't drop `{Self}`", append_const_msg)]
 #[rustc_deny_explicit_impl(implement_via_object = false)]
+#[cfg_attr(not(bootstrap), const_trait)]
 pub trait Destruct {}
 
 /// A marker for tuple types.
diff --git a/library/core/src/ops/drop.rs b/library/core/src/ops/drop.rs
index a6f63ad68d6..f3314364e54 100644
--- a/library/core/src/ops/drop.rs
+++ b/library/core/src/ops/drop.rs
@@ -203,7 +203,7 @@
 /// [nomicon]: ../../nomicon/phantom-data.html#an-exception-the-special-case-of-the-standard-library-and-its-unstable-may_dangle
 #[lang = "drop"]
 #[stable(feature = "rust1", since = "1.0.0")]
-// FIXME(const_trait_impl) #[const_trait]
+#[cfg_attr(not(bootstrap), const_trait)]
 pub trait Drop {
     /// Executes the destructor for this type.
     ///
diff --git a/tests/ui/consts/const-block-const-bound.stderr b/tests/ui/consts/const-block-const-bound.stderr
index 5e24959146b..b2b2f62c58f 100644
--- a/tests/ui/consts/const-block-const-bound.stderr
+++ b/tests/ui/consts/const-block-const-bound.stderr
@@ -1,25 +1,9 @@
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const-block-const-bound.rs:8:15
+error[E0277]: the trait bound `UnconstDrop: const Destruct` is not satisfied
+  --> $DIR/const-block-const-bound.rs:18:9
    |
-LL | const fn f<T: ~const Destruct>(x: T) {}
-   |               ^^^^^^
+LL |         f(UnconstDrop);
+   |         ^^^^^^^^^^^^^^
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const-block-const-bound.rs:8:15
-   |
-LL | const fn f<T: ~const Destruct>(x: T) {}
-   |               ^^^^^^
-   |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error[E0493]: destructor of `T` cannot be evaluated at compile-time
-  --> $DIR/const-block-const-bound.rs:8:32
-   |
-LL | const fn f<T: ~const Destruct>(x: T) {}
-   |                                ^      - value is dropped here
-   |                                |
-   |                                the destructor for this type cannot be evaluated in constant functions
-
-error: aborting due to 3 previous errors
+error: aborting due to 1 previous error
 
-For more information about this error, try `rustc --explain E0493`.
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/consts/fn_trait_refs.stderr b/tests/ui/consts/fn_trait_refs.stderr
index dc601fbe488..10850021713 100644
--- a/tests/ui/consts/fn_trait_refs.stderr
+++ b/tests/ui/consts/fn_trait_refs.stderr
@@ -17,12 +17,6 @@ LL |     T: ~const Fn<()> + ~const Destruct,
    |        ^^^^^^
 
 error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/fn_trait_refs.rs:14:24
-   |
-LL |     T: ~const Fn<()> + ~const Destruct,
-   |                        ^^^^^^
-
-error: `~const` can only be applied to `#[const_trait]` traits
   --> $DIR/fn_trait_refs.rs:14:8
    |
 LL |     T: ~const Fn<()> + ~const Destruct,
@@ -39,26 +33,12 @@ LL |     T: ~const Fn<()> + ~const Destruct,
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/fn_trait_refs.rs:14:24
-   |
-LL |     T: ~const Fn<()> + ~const Destruct,
-   |                        ^^^^^^
-   |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error: `~const` can only be applied to `#[const_trait]` traits
   --> $DIR/fn_trait_refs.rs:21:8
    |
 LL |     T: ~const FnMut<()> + ~const Destruct,
    |        ^^^^^^
 
 error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/fn_trait_refs.rs:21:27
-   |
-LL |     T: ~const FnMut<()> + ~const Destruct,
-   |                           ^^^^^^
-
-error: `~const` can only be applied to `#[const_trait]` traits
   --> $DIR/fn_trait_refs.rs:21:8
    |
 LL |     T: ~const FnMut<()> + ~const Destruct,
@@ -75,14 +55,6 @@ LL |     T: ~const FnMut<()> + ~const Destruct,
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/fn_trait_refs.rs:21:27
-   |
-LL |     T: ~const FnMut<()> + ~const Destruct,
-   |                           ^^^^^^
-   |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error: `~const` can only be applied to `#[const_trait]` traits
   --> $DIR/fn_trait_refs.rs:28:8
    |
 LL |     T: ~const FnOnce<()>,
@@ -111,12 +83,6 @@ LL |     T: ~const Fn<()> + ~const Destruct,
    |        ^^^^^^
 
 error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/fn_trait_refs.rs:35:24
-   |
-LL |     T: ~const Fn<()> + ~const Destruct,
-   |                        ^^^^^^
-
-error: `~const` can only be applied to `#[const_trait]` traits
   --> $DIR/fn_trait_refs.rs:35:8
    |
 LL |     T: ~const Fn<()> + ~const Destruct,
@@ -133,26 +99,12 @@ LL |     T: ~const Fn<()> + ~const Destruct,
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/fn_trait_refs.rs:35:24
-   |
-LL |     T: ~const Fn<()> + ~const Destruct,
-   |                        ^^^^^^
-   |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error: `~const` can only be applied to `#[const_trait]` traits
   --> $DIR/fn_trait_refs.rs:49:8
    |
 LL |     T: ~const FnMut<()> + ~const Destruct,
    |        ^^^^^^
 
 error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/fn_trait_refs.rs:49:27
-   |
-LL |     T: ~const FnMut<()> + ~const Destruct,
-   |                           ^^^^^^
-
-error: `~const` can only be applied to `#[const_trait]` traits
   --> $DIR/fn_trait_refs.rs:49:8
    |
 LL |     T: ~const FnMut<()> + ~const Destruct,
@@ -168,29 +120,35 @@ LL |     T: ~const FnMut<()> + ~const Destruct,
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/fn_trait_refs.rs:49:27
-   |
-LL |     T: ~const FnMut<()> + ~const Destruct,
-   |                           ^^^^^^
+error[E0277]: the trait bound `fn() -> i32 {one}: const Destruct` is not satisfied
+  --> $DIR/fn_trait_refs.rs:70:24
    |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+LL |         let test_one = test_fn(one);
+   |                        ^^^^^^^^^^^^
 
-error[E0015]: cannot call non-const operator in constants
-  --> $DIR/fn_trait_refs.rs:71:17
+error[E0277]: the trait bound `fn() -> i32 {two}: const Destruct` is not satisfied
+  --> $DIR/fn_trait_refs.rs:73:24
    |
-LL |         assert!(test_one == (1, 1, 1));
-   |                 ^^^^^^^^^^^^^^^^^^^^^
+LL |         let test_two = test_fn_mut(two);
+   |                        ^^^^^^^^^^^^^^^^
+
+error[E0277]: the trait bound `&T: ~const Destruct` is not satisfied
+  --> $DIR/fn_trait_refs.rs:39:9
    |
-   = note: calls in constants are limited to constant functions, tuple structs and tuple variants
+LL |         tester_fn(&f),
+   |         ^^^^^^^^^^^^^
 
-error[E0015]: cannot call non-const operator in constants
-  --> $DIR/fn_trait_refs.rs:74:17
+error[E0277]: the trait bound `&T: ~const Destruct` is not satisfied
+  --> $DIR/fn_trait_refs.rs:41:9
    |
-LL |         assert!(test_two == (2, 2));
-   |                 ^^^^^^^^^^^^^^^^^^
+LL |         tester_fn_mut(&f),
+   |         ^^^^^^^^^^^^^^^^^
+
+error[E0277]: the trait bound `&mut T: ~const Destruct` is not satisfied
+  --> $DIR/fn_trait_refs.rs:53:9
    |
-   = note: calls in constants are limited to constant functions, tuple structs and tuple variants
+LL |         tester_fn_mut(&mut f),
+   |         ^^^^^^^^^^^^^^^^^^^^^
 
 error[E0015]: cannot call non-const closure in constant functions
   --> $DIR/fn_trait_refs.rs:16:5
@@ -204,15 +162,6 @@ help: consider further restricting this bound
 LL |     T: ~const Fn<()> + ~const Destruct + ~const Fn(),
    |                                        +++++++++++++
 
-error[E0493]: destructor of `T` cannot be evaluated at compile-time
-  --> $DIR/fn_trait_refs.rs:12:23
-   |
-LL | const fn tester_fn<T>(f: T) -> T::Output
-   |                       ^ the destructor for this type cannot be evaluated in constant functions
-...
-LL | }
-   | - value is dropped here
-
 error[E0015]: cannot call non-const closure in constant functions
   --> $DIR/fn_trait_refs.rs:23:5
    |
@@ -225,15 +174,6 @@ help: consider further restricting this bound
 LL |     T: ~const FnMut<()> + ~const Destruct + ~const FnMut(),
    |                                           ++++++++++++++++
 
-error[E0493]: destructor of `T` cannot be evaluated at compile-time
-  --> $DIR/fn_trait_refs.rs:19:27
-   |
-LL | const fn tester_fn_mut<T>(mut f: T) -> T::Output
-   |                           ^^^^^ the destructor for this type cannot be evaluated in constant functions
-...
-LL | }
-   | - value is dropped here
-
 error[E0015]: cannot call non-const closure in constant functions
   --> $DIR/fn_trait_refs.rs:30:5
    |
@@ -246,25 +186,7 @@ help: consider further restricting this bound
 LL |     T: ~const FnOnce<()> + ~const FnOnce(),
    |                          +++++++++++++++++
 
-error[E0493]: destructor of `T` cannot be evaluated at compile-time
-  --> $DIR/fn_trait_refs.rs:33:21
-   |
-LL | const fn test_fn<T>(mut f: T) -> (T::Output, T::Output, T::Output)
-   |                     ^^^^^ the destructor for this type cannot be evaluated in constant functions
-...
-LL | }
-   | - value is dropped here
-
-error[E0493]: destructor of `T` cannot be evaluated at compile-time
-  --> $DIR/fn_trait_refs.rs:47:25
-   |
-LL | const fn test_fn_mut<T>(mut f: T) -> (T::Output, T::Output)
-   |                         ^^^^^ the destructor for this type cannot be evaluated in constant functions
-...
-LL | }
-   | - value is dropped here
-
-error: aborting due to 34 previous errors
+error: aborting due to 25 previous errors
 
-Some errors have detailed explanations: E0015, E0493, E0635.
+Some errors have detailed explanations: E0015, E0277, E0635.
 For more information about an error, try `rustc --explain E0015`.
diff --git a/tests/ui/consts/promoted-const-drop.rs b/tests/ui/consts/promoted-const-drop.rs
index c6ea0d0c924..e09c30ea785 100644
--- a/tests/ui/consts/promoted-const-drop.rs
+++ b/tests/ui/consts/promoted-const-drop.rs
@@ -3,7 +3,6 @@
 struct A();
 
 impl const Drop for A {
-    //~^ ERROR const `impl` for trait `Drop` which is not marked with `#[const_trait]`
     fn drop(&mut self) {}
 }
 
diff --git a/tests/ui/consts/promoted-const-drop.stderr b/tests/ui/consts/promoted-const-drop.stderr
index e015f756206..3f2182e7d41 100644
--- a/tests/ui/consts/promoted-const-drop.stderr
+++ b/tests/ui/consts/promoted-const-drop.stderr
@@ -1,14 +1,5 @@
-error: const `impl` for trait `Drop` which is not marked with `#[const_trait]`
-  --> $DIR/promoted-const-drop.rs:5:12
-   |
-LL | impl const Drop for A {
-   |            ^^^^
-   |
-   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
-   = note: adding a non-const method body in the future would be a breaking change
-
 error[E0716]: temporary value dropped while borrowed
-  --> $DIR/promoted-const-drop.rs:13:26
+  --> $DIR/promoted-const-drop.rs:12:26
    |
 LL |     let _: &'static A = &A();
    |            ----------    ^^^ creates a temporary value which is freed while still in use
@@ -19,7 +10,7 @@ LL | }
    | - temporary value is freed at the end of this statement
 
 error[E0716]: temporary value dropped while borrowed
-  --> $DIR/promoted-const-drop.rs:14:28
+  --> $DIR/promoted-const-drop.rs:13:28
    |
 LL |     let _: &'static [A] = &[C];
    |            ------------    ^^^ creates a temporary value which is freed while still in use
@@ -28,6 +19,6 @@ LL |     let _: &'static [A] = &[C];
 LL | }
    | - temporary value is freed at the end of this statement
 
-error: aborting due to 3 previous errors
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0716`.
diff --git a/tests/ui/consts/promoted_const_call.stderr b/tests/ui/consts/promoted_const_call.stderr
index 7a96b6e7705..dd70bb601c4 100644
--- a/tests/ui/consts/promoted_const_call.stderr
+++ b/tests/ui/consts/promoted_const_call.stderr
@@ -1,12 +1,3 @@
-error: const `impl` for trait `Drop` which is not marked with `#[const_trait]`
-  --> $DIR/promoted_const_call.rs:6:12
-   |
-LL | impl const Drop for Panic { fn drop(&mut self) { panic!(); } }
-   |            ^^^^
-   |
-   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
-   = note: adding a non-const method body in the future would be a breaking change
-
 error[E0493]: destructor of `Panic` cannot be evaluated at compile-time
   --> $DIR/promoted_const_call.rs:10:30
    |
@@ -57,7 +48,7 @@ LL |     let _: &'static _ = &&(Panic, 0).1;
 LL | }
    | - temporary value is freed at the end of this statement
 
-error: aborting due to 6 previous errors
+error: aborting due to 5 previous errors
 
 Some errors have detailed explanations: E0493, E0716.
 For more information about an error, try `rustc --explain E0493`.
diff --git a/tests/ui/dropck/const_drop_is_valid.rs b/tests/ui/dropck/const_drop_is_valid.rs
deleted file mode 100644
index 26ef2d61deb..00000000000
--- a/tests/ui/dropck/const_drop_is_valid.rs
+++ /dev/null
@@ -1,8 +0,0 @@
-struct A();
-
-impl const Drop for A {}
-//~^ ERROR: const trait impls are experimental
-//~| const `impl` for trait `Drop` which is not marked with `#[const_trait]`
-//~| not all trait items implemented, missing: `drop`
-
-fn main() {}
diff --git a/tests/ui/dropck/const_drop_is_valid.stderr b/tests/ui/dropck/const_drop_is_valid.stderr
deleted file mode 100644
index 5837e1623a1..00000000000
--- a/tests/ui/dropck/const_drop_is_valid.stderr
+++ /dev/null
@@ -1,31 +0,0 @@
-error[E0658]: const trait impls are experimental
-  --> $DIR/const_drop_is_valid.rs:3:6
-   |
-LL | impl const Drop for A {}
-   |      ^^^^^
-   |
-   = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information
-   = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
-   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
-
-error: const `impl` for trait `Drop` which is not marked with `#[const_trait]`
-  --> $DIR/const_drop_is_valid.rs:3:12
-   |
-LL | impl const Drop for A {}
-   |            ^^^^
-   |
-   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
-   = note: adding a non-const method body in the future would be a breaking change
-
-error[E0046]: not all trait items implemented, missing: `drop`
-  --> $DIR/const_drop_is_valid.rs:3:1
-   |
-LL | impl const Drop for A {}
-   | ^^^^^^^^^^^^^^^^^^^^^ missing `drop` in implementation
-   |
-   = help: implement the missing item: `fn drop(&mut self) { todo!() }`
-
-error: aborting due to 3 previous errors
-
-Some errors have detailed explanations: E0046, E0658.
-For more information about an error, try `rustc --explain E0046`.
diff --git a/tests/ui/impl-trait/normalize-tait-in-const.stderr b/tests/ui/impl-trait/normalize-tait-in-const.stderr
index f9142664f1b..bb874cbe41b 100644
--- a/tests/ui/impl-trait/normalize-tait-in-const.stderr
+++ b/tests/ui/impl-trait/normalize-tait-in-const.stderr
@@ -5,12 +5,6 @@ LL | const fn with_positive<F: for<'a> ~const Fn(&'a Alias<'a>) + ~const Destruc
    |                                   ^^^^^^
 
 error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/normalize-tait-in-const.rs:26:62
-   |
-LL | const fn with_positive<F: for<'a> ~const Fn(&'a Alias<'a>) + ~const Destruct>(fun: F) {
-   |                                                              ^^^^^^
-
-error: `~const` can only be applied to `#[const_trait]` traits
   --> $DIR/normalize-tait-in-const.rs:26:35
    |
 LL | const fn with_positive<F: for<'a> ~const Fn(&'a Alias<'a>) + ~const Destruct>(fun: F) {
@@ -18,13 +12,11 @@ LL | const fn with_positive<F: for<'a> ~const Fn(&'a Alias<'a>) + ~const Destruc
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/normalize-tait-in-const.rs:26:62
-   |
-LL | const fn with_positive<F: for<'a> ~const Fn(&'a Alias<'a>) + ~const Destruct>(fun: F) {
-   |                                                              ^^^^^^
+error[E0277]: the trait bound `for<'a, 'b> fn(&'a foo::Alias<'b>) {foo}: const Destruct` is not satisfied
+  --> $DIR/normalize-tait-in-const.rs:33:5
    |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+LL |     with_positive(foo);
+   |     ^^^^^^^^^^^^^^^^^^
 
 error[E0015]: cannot call non-const closure in constant functions
   --> $DIR/normalize-tait-in-const.rs:27:5
@@ -38,16 +30,7 @@ help: consider further restricting this bound
 LL | const fn with_positive<F: for<'a> ~const Fn(&'a Alias<'a>) + ~const Destruct + ~const Fn(&foo::Alias<'_>)>(fun: F) {
    |                                                                              ++++++++++++++++++++++++++++
 
-error[E0493]: destructor of `F` cannot be evaluated at compile-time
-  --> $DIR/normalize-tait-in-const.rs:26:79
-   |
-LL | const fn with_positive<F: for<'a> ~const Fn(&'a Alias<'a>) + ~const Destruct>(fun: F) {
-   |                                                                               ^^^ the destructor for this type cannot be evaluated in constant functions
-LL |     fun(filter_positive());
-LL | }
-   | - value is dropped here
-
-error: aborting due to 6 previous errors
+error: aborting due to 4 previous errors
 
-Some errors have detailed explanations: E0015, E0493.
+Some errors have detailed explanations: E0015, E0277.
 For more information about an error, try `rustc --explain E0015`.
diff --git a/tests/ui/traits/const-traits/const-drop-bound.stderr b/tests/ui/traits/const-traits/const-drop-bound.stderr
index eba39f859af..60718cc84c1 100644
--- a/tests/ui/traits/const-traits/const-drop-bound.stderr
+++ b/tests/ui/traits/const-traits/const-drop-bound.stderr
@@ -1,53 +1,9 @@
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const-drop-bound.rs:9:61
+error[E0277]: the trait bound `Foo<E>: ~const Destruct` is not satisfied
+  --> $DIR/const-drop-bound.rs:23:5
    |
-LL | const fn foo<T, E>(res: Result<T, E>) -> Option<T> where E: ~const Destruct {
-   |                                                             ^^^^^^
+LL |     foo(res)
+   |     ^^^^^^^^
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const-drop-bound.rs:9:61
-   |
-LL | const fn foo<T, E>(res: Result<T, E>) -> Option<T> where E: ~const Destruct {
-   |                                                             ^^^^^^
-   |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const-drop-bound.rs:20:8
-   |
-LL |     T: ~const Destruct,
-   |        ^^^^^^
-
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const-drop-bound.rs:21:8
-   |
-LL |     E: ~const Destruct,
-   |        ^^^^^^
-
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const-drop-bound.rs:20:8
-   |
-LL |     T: ~const Destruct,
-   |        ^^^^^^
-   |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const-drop-bound.rs:21:8
-   |
-LL |     E: ~const Destruct,
-   |        ^^^^^^
-   |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error[E0493]: destructor of `E` cannot be evaluated at compile-time
-  --> $DIR/const-drop-bound.rs:12:13
-   |
-LL |         Err(_e) => None,
-   |             ^^        - value is dropped here
-   |             |
-   |             the destructor for this type cannot be evaluated in constant functions
-
-error: aborting due to 7 previous errors
+error: aborting due to 1 previous error
 
-For more information about this error, try `rustc --explain E0493`.
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/const-traits/const-drop-fail-2.precise.stderr b/tests/ui/traits/const-traits/const-drop-fail-2.precise.stderr
index 7529af9293d..bb9966c7ec3 100644
--- a/tests/ui/traits/const-traits/const-drop-fail-2.precise.stderr
+++ b/tests/ui/traits/const-traits/const-drop-fail-2.precise.stderr
@@ -1,26 +1,13 @@
-error: const `impl` for trait `Drop` which is not marked with `#[const_trait]`
-  --> $DIR/const-drop-fail-2.rs:23:25
+error[E0277]: the trait bound `ConstDropImplWithBounds<NonTrivialDrop>: const Destruct` is not satisfied
+  --> $DIR/const-drop-fail-2.rs:31:15
    |
-LL | impl<T: ~const A> const Drop for ConstDropImplWithBounds<T> {
-   |                         ^^^^
-   |
-   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
-   = note: adding a non-const method body in the future would be a breaking change
-
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const-drop-fail-2.rs:29:26
-   |
-LL | const fn check<T: ~const Destruct>(_: T) {}
-   |                          ^^^^^^^^
-
-error: const `impl` for trait `Drop` which is not marked with `#[const_trait]`
-  --> $DIR/const-drop-fail-2.rs:39:25
-   |
-LL | impl<T: ~const A> const Drop for ConstDropImplWithNonConstBounds<T> {
-   |                         ^^^^
-   |
-   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
-   = note: adding a non-const method body in the future would be a breaking change
+LL |   const _: () = check::<ConstDropImplWithBounds<NonTrivialDrop>>(
+   |  _______________^
+LL | |
+LL | |     ConstDropImplWithBounds(PhantomData)
+LL | | );
+   | |_^
 
-error: aborting due to 3 previous errors
+error: aborting due to 1 previous error
 
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/const-traits/const-drop-fail-2.rs b/tests/ui/traits/const-traits/const-drop-fail-2.rs
index ed4faa95bd0..1bcc87e9070 100644
--- a/tests/ui/traits/const-traits/const-drop-fail-2.rs
+++ b/tests/ui/traits/const-traits/const-drop-fail-2.rs
@@ -1,6 +1,7 @@
-//@ known-bug: #110395
+//@ revisions: stock precise
+
 #![feature(const_trait_impl, const_destruct)]
-// #![cfg_attr(precise, feature(const_precise_live_drops))]
+#![cfg_attr(precise, feature(const_precise_live_drops))]
 
 use std::marker::{Destruct, PhantomData};
 
@@ -19,9 +20,7 @@ impl A for NonTrivialDrop {}
 
 const fn check<T: ~const Destruct>(_: T) {}
 
-
-/* FIXME(const_trait_impl)
-struct ConstDropImplWithBounds<T: ~const A>(PhantomData<T>);
+struct ConstDropImplWithBounds<T: A>(PhantomData<T>);
 
 impl<T: ~const A> const Drop for ConstDropImplWithBounds<T> {
     fn drop(&mut self) {
@@ -30,9 +29,9 @@ impl<T: ~const A> const Drop for ConstDropImplWithBounds<T> {
 }
 
 const _: () = check::<ConstDropImplWithBounds<NonTrivialDrop>>(
+    //~^ ERROR the trait bound
     ConstDropImplWithBounds(PhantomData)
 );
-*/
 
 struct ConstDropImplWithNonConstBounds<T: A>(PhantomData<T>);
 
diff --git a/tests/ui/traits/const-traits/const-drop-fail-2.stderr b/tests/ui/traits/const-traits/const-drop-fail-2.stderr
deleted file mode 100644
index fde106599c2..00000000000
--- a/tests/ui/traits/const-traits/const-drop-fail-2.stderr
+++ /dev/null
@@ -1,41 +0,0 @@
-error: const `impl` for trait `Drop` which is not marked with `#[const_trait]`
-  --> $DIR/const-drop-fail-2.rs:39:25
-   |
-LL | impl<T: ~const A> const Drop for ConstDropImplWithNonConstBounds<T> {
-   |                         ^^^^
-   |
-   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
-   = note: adding a non-const method body in the future would be a breaking change
-
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const-drop-fail-2.rs:20:19
-   |
-LL | const fn check<T: ~const Destruct>(_: T) {}
-   |                   ^^^^^^
-
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const-drop-fail-2.rs:20:19
-   |
-LL | const fn check<T: ~const Destruct>(_: T) {}
-   |                   ^^^^^^
-   |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error[E0277]: the trait bound `T: ~const A` is not satisfied
-  --> $DIR/const-drop-fail-2.rs:41:9
-   |
-LL |         T::a();
-   |         ^^^^^^
-
-error[E0493]: destructor of `T` cannot be evaluated at compile-time
-  --> $DIR/const-drop-fail-2.rs:20:36
-   |
-LL | const fn check<T: ~const Destruct>(_: T) {}
-   |                                    ^      - value is dropped here
-   |                                    |
-   |                                    the destructor for this type cannot be evaluated in constant functions
-
-error: aborting due to 5 previous errors
-
-Some errors have detailed explanations: E0277, E0493.
-For more information about an error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/const-traits/const-drop-fail-2.stock.stderr b/tests/ui/traits/const-traits/const-drop-fail-2.stock.stderr
index 7529af9293d..bb9966c7ec3 100644
--- a/tests/ui/traits/const-traits/const-drop-fail-2.stock.stderr
+++ b/tests/ui/traits/const-traits/const-drop-fail-2.stock.stderr
@@ -1,26 +1,13 @@
-error: const `impl` for trait `Drop` which is not marked with `#[const_trait]`
-  --> $DIR/const-drop-fail-2.rs:23:25
+error[E0277]: the trait bound `ConstDropImplWithBounds<NonTrivialDrop>: const Destruct` is not satisfied
+  --> $DIR/const-drop-fail-2.rs:31:15
    |
-LL | impl<T: ~const A> const Drop for ConstDropImplWithBounds<T> {
-   |                         ^^^^
-   |
-   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
-   = note: adding a non-const method body in the future would be a breaking change
-
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const-drop-fail-2.rs:29:26
-   |
-LL | const fn check<T: ~const Destruct>(_: T) {}
-   |                          ^^^^^^^^
-
-error: const `impl` for trait `Drop` which is not marked with `#[const_trait]`
-  --> $DIR/const-drop-fail-2.rs:39:25
-   |
-LL | impl<T: ~const A> const Drop for ConstDropImplWithNonConstBounds<T> {
-   |                         ^^^^
-   |
-   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
-   = note: adding a non-const method body in the future would be a breaking change
+LL |   const _: () = check::<ConstDropImplWithBounds<NonTrivialDrop>>(
+   |  _______________^
+LL | |
+LL | |     ConstDropImplWithBounds(PhantomData)
+LL | | );
+   | |_^
 
-error: aborting due to 3 previous errors
+error: aborting due to 1 previous error
 
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/const-traits/const-drop-fail.precise.stderr b/tests/ui/traits/const-traits/const-drop-fail.precise.stderr
index 91ca60b750d..67e774fbd05 100644
--- a/tests/ui/traits/const-traits/const-drop-fail.precise.stderr
+++ b/tests/ui/traits/const-traits/const-drop-fail.precise.stderr
@@ -1,47 +1,4 @@
-error: const `impl` for trait `Drop` which is not marked with `#[const_trait]`
-  --> $DIR/const-drop-fail.rs:19:12
-   |
-LL | impl const Drop for ConstImplWithDropGlue {
-   |            ^^^^
-   |
-   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
-   = note: adding a non-const method body in the future would be a breaking change
-
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const-drop-fail.rs:23:19
-   |
-LL | const fn check<T: ~const Destruct>(_: T) {}
-   |                   ^^^^^^
-
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const-drop-fail.rs:23:19
-   |
-LL | const fn check<T: ~const Destruct>(_: T) {}
-   |                   ^^^^^^
-   |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error[E0493]: destructor of `T` cannot be evaluated at compile-time
-  --> $DIR/const-drop-fail.rs:23:36
-   |
-LL | const fn check<T: ~const Destruct>(_: T) {}
-   |                                    ^      - value is dropped here
-   |                                    |
-   |                                    the destructor for this type cannot be evaluated in constant functions
-
-error[E0080]: evaluation of constant value failed
-  --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
-   |
-   = note: calling non-const function `<NonTrivialDrop as Drop>::drop`
-   |
-note: inside `std::ptr::drop_in_place::<NonTrivialDrop> - shim(Some(NonTrivialDrop))`
-  --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
-note: inside `check::<NonTrivialDrop>`
-  --> $DIR/const-drop-fail.rs:23:43
-   |
-LL | const fn check<T: ~const Destruct>(_: T) {}
-   |                                           ^
-note: inside `_`
+error[E0277]: the trait bound `NonTrivialDrop: const Destruct` is not satisfied
   --> $DIR/const-drop-fail.rs:27:23
    |
 LL |           const _: () = check($exp);
@@ -52,23 +9,10 @@ LL | |     NonTrivialDrop,
 LL | |     ConstImplWithDropGlue(NonTrivialDrop),
 LL | | }
    | |_- in this macro invocation
+   |
    = note: this error originates in the macro `check_all` (in Nightly builds, run with -Z macro-backtrace for more info)
 
-error[E0080]: evaluation of constant value failed
-  --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
-   |
-   = note: calling non-const function `<NonTrivialDrop as Drop>::drop`
-   |
-note: inside `std::ptr::drop_in_place::<NonTrivialDrop> - shim(Some(NonTrivialDrop))`
-  --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
-note: inside `std::ptr::drop_in_place::<ConstImplWithDropGlue> - shim(Some(ConstImplWithDropGlue))`
-  --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
-note: inside `check::<ConstImplWithDropGlue>`
-  --> $DIR/const-drop-fail.rs:23:43
-   |
-LL | const fn check<T: ~const Destruct>(_: T) {}
-   |                                           ^
-note: inside `_`
+error[E0277]: the trait bound `NonTrivialDrop: const Destruct` is not satisfied
   --> $DIR/const-drop-fail.rs:27:23
    |
 LL |           const _: () = check($exp);
@@ -79,9 +23,10 @@ LL | |     NonTrivialDrop,
 LL | |     ConstImplWithDropGlue(NonTrivialDrop),
 LL | | }
    | |_- in this macro invocation
+   |
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
    = note: this error originates in the macro `check_all` (in Nightly builds, run with -Z macro-backtrace for more info)
 
-error: aborting due to 6 previous errors
+error: aborting due to 2 previous errors
 
-Some errors have detailed explanations: E0080, E0493.
-For more information about an error, try `rustc --explain E0080`.
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/const-traits/const-drop-fail.rs b/tests/ui/traits/const-traits/const-drop-fail.rs
index c61afc0e17a..08435266e1f 100644
--- a/tests/ui/traits/const-traits/const-drop-fail.rs
+++ b/tests/ui/traits/const-traits/const-drop-fail.rs
@@ -1,6 +1,6 @@
-//@ known-bug: #110395
-
+//@ compile-flags: -Znext-solver
 //@ revisions: stock precise
+
 #![feature(const_trait_impl, const_destruct)]
 #![cfg_attr(precise, feature(const_precise_live_drops))]
 
@@ -25,6 +25,8 @@ const fn check<T: ~const Destruct>(_: T) {}
 macro_rules! check_all {
     ($($exp:expr),*$(,)?) => {$(
         const _: () = check($exp);
+        //~^ ERROR the trait bound `NonTrivialDrop: const Destruct` is not satisfied
+        //~| ERROR the trait bound `NonTrivialDrop: const Destruct` is not satisfied
     )*};
 }
 
diff --git a/tests/ui/traits/const-traits/const-drop-fail.stock.stderr b/tests/ui/traits/const-traits/const-drop-fail.stock.stderr
index 20dea28922b..67e774fbd05 100644
--- a/tests/ui/traits/const-traits/const-drop-fail.stock.stderr
+++ b/tests/ui/traits/const-traits/const-drop-fail.stock.stderr
@@ -1,34 +1,32 @@
-error: const `impl` for trait `Drop` which is not marked with `#[const_trait]`
-  --> $DIR/const-drop-fail.rs:19:12
+error[E0277]: the trait bound `NonTrivialDrop: const Destruct` is not satisfied
+  --> $DIR/const-drop-fail.rs:27:23
    |
-LL | impl const Drop for ConstImplWithDropGlue {
-   |            ^^^^
+LL |           const _: () = check($exp);
+   |                         ^^^^^^^^^^^
+...
+LL | / check_all! {
+LL | |     NonTrivialDrop,
+LL | |     ConstImplWithDropGlue(NonTrivialDrop),
+LL | | }
+   | |_- in this macro invocation
    |
-   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
-   = note: adding a non-const method body in the future would be a breaking change
+   = note: this error originates in the macro `check_all` (in Nightly builds, run with -Z macro-backtrace for more info)
 
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const-drop-fail.rs:23:19
+error[E0277]: the trait bound `NonTrivialDrop: const Destruct` is not satisfied
+  --> $DIR/const-drop-fail.rs:27:23
    |
-LL | const fn check<T: ~const Destruct>(_: T) {}
-   |                   ^^^^^^
-
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const-drop-fail.rs:23:19
-   |
-LL | const fn check<T: ~const Destruct>(_: T) {}
-   |                   ^^^^^^
+LL |           const _: () = check($exp);
+   |                         ^^^^^^^^^^^
+...
+LL | / check_all! {
+LL | |     NonTrivialDrop,
+LL | |     ConstImplWithDropGlue(NonTrivialDrop),
+LL | | }
+   | |_- in this macro invocation
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+   = note: this error originates in the macro `check_all` (in Nightly builds, run with -Z macro-backtrace for more info)
 
-error[E0493]: destructor of `T` cannot be evaluated at compile-time
-  --> $DIR/const-drop-fail.rs:23:36
-   |
-LL | const fn check<T: ~const Destruct>(_: T) {}
-   |                                    ^      - value is dropped here
-   |                                    |
-   |                                    the destructor for this type cannot be evaluated in constant functions
-
-error: aborting due to 4 previous errors
+error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0493`.
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/const-traits/const-drop.precise.stderr b/tests/ui/traits/const-traits/const-drop.precise.stderr
deleted file mode 100644
index 51a66396c4b..00000000000
--- a/tests/ui/traits/const-traits/const-drop.precise.stderr
+++ /dev/null
@@ -1,100 +0,0 @@
-error: const `impl` for trait `Drop` which is not marked with `#[const_trait]`
-  --> $DIR/const-drop.rs:12:16
-   |
-LL | impl<'a> const Drop for S<'a> {
-   |                ^^^^
-   |
-   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
-   = note: adding a non-const method body in the future would be a breaking change
-
-error: const `impl` for trait `Drop` which is not marked with `#[const_trait]`
-  --> $DIR/const-drop.rs:46:16
-   |
-LL |     impl const Drop for ConstDrop {
-   |                ^^^^
-   |
-   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
-   = note: adding a non-const method body in the future would be a breaking change
-
-error: const `impl` for trait `Drop` which is not marked with `#[const_trait]`
-  --> $DIR/const-drop.rs:67:37
-   |
-LL |     impl<T: ~const SomeTrait> const Drop for ConstDropWithBound<T> {
-   |                                     ^^^^
-   |
-   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
-   = note: adding a non-const method body in the future would be a breaking change
-
-error: const `impl` for trait `Drop` which is not marked with `#[const_trait]`
-  --> $DIR/const-drop.rs:75:30
-   |
-LL |     impl<T: SomeTrait> const Drop for ConstDropWithNonconstBound<T> {
-   |                              ^^^^
-   |
-   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
-   = note: adding a non-const method body in the future would be a breaking change
-
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const-drop.rs:18:15
-   |
-LL | const fn a<T: ~const Destruct>(_: T) {}
-   |               ^^^^^^
-
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const-drop.rs:18:15
-   |
-LL | const fn a<T: ~const Destruct>(_: T) {}
-   |               ^^^^^^
-   |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error[E0277]: the trait bound `T: const SomeTrait` is not satisfied
-  --> $DIR/const-drop.rs:67:46
-   |
-LL |     impl<T: ~const SomeTrait> const Drop for ConstDropWithBound<T> {
-   |                                              ^^^^^^^^^^^^^^^^^^^^^
-   |
-note: required by a bound in `t::ConstDropWithBound`
-  --> $DIR/const-drop.rs:65:38
-   |
-LL |     pub struct ConstDropWithBound<T: const SomeTrait>(pub core::marker::PhantomData<T>);
-   |                                      ^^^^^ required by this bound in `ConstDropWithBound`
-
-error[E0277]: the trait bound `T: const SomeTrait` is not satisfied
-  --> $DIR/const-drop.rs:68:22
-   |
-LL |         fn drop(&mut self) {
-   |                      ^^^^
-   |
-note: required by a bound in `t::ConstDropWithBound`
-  --> $DIR/const-drop.rs:65:38
-   |
-LL |     pub struct ConstDropWithBound<T: const SomeTrait>(pub core::marker::PhantomData<T>);
-   |                                      ^^^^^ required by this bound in `ConstDropWithBound`
-
-error[E0493]: destructor of `S<'_>` cannot be evaluated at compile-time
-  --> $DIR/const-drop.rs:23:13
-   |
-LL |     let _ = S(&mut c);
-   |             ^^^^^^^^^- value is dropped here
-   |             |
-   |             the destructor for this type cannot be evaluated in constant functions
-
-error[E0493]: destructor of `T` cannot be evaluated at compile-time
-  --> $DIR/const-drop.rs:18:32
-   |
-LL | const fn a<T: ~const Destruct>(_: T) {}
-   |                                ^      - value is dropped here
-   |                                |
-   |                                the destructor for this type cannot be evaluated in constant functions
-
-error[E0277]: the trait bound `T: ~const SomeTrait` is not satisfied
-  --> $DIR/const-drop.rs:69:13
-   |
-LL |             T::foo();
-   |             ^^^^^^^^
-
-error: aborting due to 11 previous errors
-
-Some errors have detailed explanations: E0277, E0493.
-For more information about an error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/const-traits/const-drop.rs b/tests/ui/traits/const-traits/const-drop.rs
index 8bf1dd68b5c..e2d87aeff47 100644
--- a/tests/ui/traits/const-traits/const-drop.rs
+++ b/tests/ui/traits/const-traits/const-drop.rs
@@ -1,6 +1,7 @@
-// FIXME run-pass
-//@ known-bug: #110395
+//@ run-pass
+//@ compile-flags: -Znext-solver
 //@ revisions: stock precise
+
 #![feature(const_trait_impl, const_destruct)]
 #![feature(never_type)]
 #![cfg_attr(precise, feature(const_precise_live_drops))]
@@ -64,7 +65,7 @@ mod t {
 
     pub struct ConstDropWithBound<T: const SomeTrait>(pub core::marker::PhantomData<T>);
 
-    impl<T: ~const SomeTrait> const Drop for ConstDropWithBound<T> {
+    impl<T: const SomeTrait> const Drop for ConstDropWithBound<T> {
         fn drop(&mut self) {
             T::foo();
         }
diff --git a/tests/ui/traits/const-traits/const-drop.stock.stderr b/tests/ui/traits/const-traits/const-drop.stock.stderr
deleted file mode 100644
index 51a66396c4b..00000000000
--- a/tests/ui/traits/const-traits/const-drop.stock.stderr
+++ /dev/null
@@ -1,100 +0,0 @@
-error: const `impl` for trait `Drop` which is not marked with `#[const_trait]`
-  --> $DIR/const-drop.rs:12:16
-   |
-LL | impl<'a> const Drop for S<'a> {
-   |                ^^^^
-   |
-   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
-   = note: adding a non-const method body in the future would be a breaking change
-
-error: const `impl` for trait `Drop` which is not marked with `#[const_trait]`
-  --> $DIR/const-drop.rs:46:16
-   |
-LL |     impl const Drop for ConstDrop {
-   |                ^^^^
-   |
-   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
-   = note: adding a non-const method body in the future would be a breaking change
-
-error: const `impl` for trait `Drop` which is not marked with `#[const_trait]`
-  --> $DIR/const-drop.rs:67:37
-   |
-LL |     impl<T: ~const SomeTrait> const Drop for ConstDropWithBound<T> {
-   |                                     ^^^^
-   |
-   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
-   = note: adding a non-const method body in the future would be a breaking change
-
-error: const `impl` for trait `Drop` which is not marked with `#[const_trait]`
-  --> $DIR/const-drop.rs:75:30
-   |
-LL |     impl<T: SomeTrait> const Drop for ConstDropWithNonconstBound<T> {
-   |                              ^^^^
-   |
-   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
-   = note: adding a non-const method body in the future would be a breaking change
-
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const-drop.rs:18:15
-   |
-LL | const fn a<T: ~const Destruct>(_: T) {}
-   |               ^^^^^^
-
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const-drop.rs:18:15
-   |
-LL | const fn a<T: ~const Destruct>(_: T) {}
-   |               ^^^^^^
-   |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error[E0277]: the trait bound `T: const SomeTrait` is not satisfied
-  --> $DIR/const-drop.rs:67:46
-   |
-LL |     impl<T: ~const SomeTrait> const Drop for ConstDropWithBound<T> {
-   |                                              ^^^^^^^^^^^^^^^^^^^^^
-   |
-note: required by a bound in `t::ConstDropWithBound`
-  --> $DIR/const-drop.rs:65:38
-   |
-LL |     pub struct ConstDropWithBound<T: const SomeTrait>(pub core::marker::PhantomData<T>);
-   |                                      ^^^^^ required by this bound in `ConstDropWithBound`
-
-error[E0277]: the trait bound `T: const SomeTrait` is not satisfied
-  --> $DIR/const-drop.rs:68:22
-   |
-LL |         fn drop(&mut self) {
-   |                      ^^^^
-   |
-note: required by a bound in `t::ConstDropWithBound`
-  --> $DIR/const-drop.rs:65:38
-   |
-LL |     pub struct ConstDropWithBound<T: const SomeTrait>(pub core::marker::PhantomData<T>);
-   |                                      ^^^^^ required by this bound in `ConstDropWithBound`
-
-error[E0493]: destructor of `S<'_>` cannot be evaluated at compile-time
-  --> $DIR/const-drop.rs:23:13
-   |
-LL |     let _ = S(&mut c);
-   |             ^^^^^^^^^- value is dropped here
-   |             |
-   |             the destructor for this type cannot be evaluated in constant functions
-
-error[E0493]: destructor of `T` cannot be evaluated at compile-time
-  --> $DIR/const-drop.rs:18:32
-   |
-LL | const fn a<T: ~const Destruct>(_: T) {}
-   |                                ^      - value is dropped here
-   |                                |
-   |                                the destructor for this type cannot be evaluated in constant functions
-
-error[E0277]: the trait bound `T: ~const SomeTrait` is not satisfied
-  --> $DIR/const-drop.rs:69:13
-   |
-LL |             T::foo();
-   |             ^^^^^^^^
-
-error: aborting due to 11 previous errors
-
-Some errors have detailed explanations: E0277, E0493.
-For more information about an error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/const-traits/issue-92111.rs b/tests/ui/traits/const-traits/issue-92111.rs
index 64bf0f20e91..c8db5cc9e7a 100644
--- a/tests/ui/traits/const-traits/issue-92111.rs
+++ b/tests/ui/traits/const-traits/issue-92111.rs
@@ -1,7 +1,4 @@
-// Regression test for #92111.
-//
-//@ known-bug: #110395
-// FIXME check-pass
+//@ check-pass
 
 #![feature(const_trait_impl, const_destruct)]
 
diff --git a/tests/ui/traits/const-traits/issue-92111.stderr b/tests/ui/traits/const-traits/issue-92111.stderr
deleted file mode 100644
index 51c6a22b43b..00000000000
--- a/tests/ui/traits/const-traits/issue-92111.stderr
+++ /dev/null
@@ -1,25 +0,0 @@
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/issue-92111.rs:20:15
-   |
-LL | const fn a<T: ~const Destruct>(t: T) {}
-   |               ^^^^^^
-
-error: `~const` can only be applied to `#[const_trait]` traits
-  --> $DIR/issue-92111.rs:20:15
-   |
-LL | const fn a<T: ~const Destruct>(t: T) {}
-   |               ^^^^^^
-   |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error[E0493]: destructor of `T` cannot be evaluated at compile-time
-  --> $DIR/issue-92111.rs:20:32
-   |
-LL | const fn a<T: ~const Destruct>(t: T) {}
-   |                                ^      - value is dropped here
-   |                                |
-   |                                the destructor for this type cannot be evaluated in constant functions
-
-error: aborting due to 3 previous errors
-
-For more information about this error, try `rustc --explain E0493`.