about summary refs log tree commit diff
path: root/tests/ui
diff options
context:
space:
mode:
authorDeadbeef <ent3rm4n@gmail.com>2025-07-13 16:49:19 +0800
committerDeadbeef <ent3rm4n@gmail.com>2025-07-17 18:06:26 +0800
commit69326878eeabb713e2d4a85215b87f18e498313c (patch)
treebf785ce27bea3392a70c2af0f8c0f4e732c435b4 /tests/ui
parentf8f6997469237299c1d60814c7b9828602a1f8e4 (diff)
downloadrust-69326878eeabb713e2d4a85215b87f18e498313c.tar.gz
rust-69326878eeabb713e2d4a85215b87f18e498313c.zip
parse `const trait Trait`
Diffstat (limited to 'tests/ui')
-rw-r--r--tests/ui/consts/const-try.rs4
-rw-r--r--tests/ui/consts/const-try.stderr8
-rw-r--r--tests/ui/consts/rustc-impl-const-stability.stderr4
-rw-r--r--tests/ui/specialization/const_trait_impl.stderr24
-rw-r--r--tests/ui/stability-attribute/missing-const-stability.rs3
-rw-r--r--tests/ui/stability-attribute/missing-const-stability.stderr6
-rw-r--r--tests/ui/traits/const-traits/conditionally-const-invalid-places.stderr8
-rw-r--r--tests/ui/traits/const-traits/const-bounds-non-const-trait.rs6
-rw-r--r--tests/ui/traits/const-traits/const-bounds-non-const-trait.stderr12
-rw-r--r--tests/ui/traits/const-traits/const-impl-requires-const-trait.rs2
-rw-r--r--tests/ui/traits/const-traits/const-impl-requires-const-trait.stderr6
-rw-r--r--tests/ui/traits/const-traits/const-trait-bounds-trait-objects.rs8
-rw-r--r--tests/ui/traits/const-traits/const-trait-bounds-trait-objects.stderr20
-rw-r--r--tests/ui/traits/const-traits/const_derives/derive-const-gate.rs2
-rw-r--r--tests/ui/traits/const-traits/const_derives/derive-const-gate.stderr4
-rw-r--r--tests/ui/traits/const-traits/const_derives/derive-const-non-const-type.stderr4
-rw-r--r--tests/ui/traits/const-traits/ice-119717-constant-lifetime.rs2
-rw-r--r--tests/ui/traits/const-traits/ice-119717-constant-lifetime.stderr4
-rw-r--r--tests/ui/traits/const-traits/ice-126148-failed-to-normalize.rs4
-rw-r--r--tests/ui/traits/const-traits/ice-126148-failed-to-normalize.stderr8
-rw-r--r--tests/ui/traits/const-traits/spec-effectvar-ice.rs6
-rw-r--r--tests/ui/traits/const-traits/spec-effectvar-ice.stderr16
-rw-r--r--tests/ui/traits/const-traits/super-traits-fail-2.nn.stderr14
-rw-r--r--tests/ui/traits/const-traits/super-traits-fail-2.ny.stderr20
-rw-r--r--tests/ui/traits/const-traits/super-traits-fail-2.rs10
-rw-r--r--tests/ui/traits/const-traits/super-traits-fail-2.yn.stderr2
-rw-r--r--tests/ui/traits/const-traits/super-traits-fail-3.nnn.stderr22
-rw-r--r--tests/ui/traits/const-traits/super-traits-fail-3.nny.stderr22
-rw-r--r--tests/ui/traits/const-traits/super-traits-fail-3.rs14
-rw-r--r--tests/ui/traits/const-traits/super-traits-fail-3.ynn.stderr22
-rw-r--r--tests/ui/traits/const-traits/super-traits-fail-3.yny.stderr20
-rw-r--r--tests/ui/traits/const-traits/super-traits-fail-3.yyn.stderr10
-rw-r--r--tests/ui/traits/const-traits/trait-default-body-stability.stderr8
33 files changed, 161 insertions, 164 deletions
diff --git a/tests/ui/consts/const-try.rs b/tests/ui/consts/const-try.rs
index 26aa9230a39..e13fad78441 100644
--- a/tests/ui/consts/const-try.rs
+++ b/tests/ui/consts/const-try.rs
@@ -13,14 +13,14 @@ struct TryMe;
 struct Error;
 
 impl const FromResidual<Error> for TryMe {
-    //~^ ERROR const `impl` for trait `FromResidual` which is not marked with `#[const_trait]`
+    //~^ ERROR const `impl` for trait `FromResidual` which is not `const`
     fn from_residual(residual: Error) -> Self {
         TryMe
     }
 }
 
 impl const Try for TryMe {
-    //~^ ERROR const `impl` for trait `Try` which is not marked with `#[const_trait]`
+    //~^ ERROR const `impl` for trait `Try` which is not `const`
     type Output = ();
     type Residual = Error;
     fn from_output(output: Self::Output) -> Self {
diff --git a/tests/ui/consts/const-try.stderr b/tests/ui/consts/const-try.stderr
index 4209ca1d526..7004ea3e6db 100644
--- a/tests/ui/consts/const-try.stderr
+++ b/tests/ui/consts/const-try.stderr
@@ -1,19 +1,19 @@
-error: const `impl` for trait `FromResidual` which is not marked with `#[const_trait]`
+error: const `impl` for trait `FromResidual` which is not `const`
   --> $DIR/const-try.rs:15:12
    |
 LL | impl const FromResidual<Error> for TryMe {
    |            ^^^^^^^^^^^^^^^^^^^ this trait is not `const`
    |
-   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
+   = note: marking a trait with `const` 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 `Try` which is not marked with `#[const_trait]`
+error: const `impl` for trait `Try` which is not `const`
   --> $DIR/const-try.rs:22:12
    |
 LL | impl const Try for TryMe {
    |            ^^^ this trait is not `const`
    |
-   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
+   = note: marking a trait with `const` ensures all default method bodies are `const`
    = note: adding a non-const method body in the future would be a breaking change
 
 error[E0015]: `?` is not allowed on `TryMe` in constant functions
diff --git a/tests/ui/consts/rustc-impl-const-stability.stderr b/tests/ui/consts/rustc-impl-const-stability.stderr
index a3ef4031a13..55c08539688 100644
--- a/tests/ui/consts/rustc-impl-const-stability.stderr
+++ b/tests/ui/consts/rustc-impl-const-stability.stderr
@@ -1,10 +1,10 @@
-error: const `impl` for trait `Debug` which is not marked with `#[const_trait]`
+error: const `impl` for trait `Debug` which is not `const`
   --> $DIR/rustc-impl-const-stability.rs:15:12
    |
 LL | impl const std::fmt::Debug for Data {
    |            ^^^^^^^^^^^^^^^ this trait is not `const`
    |
-   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
+   = note: marking a trait with `const` ensures all default method bodies are `const`
    = note: adding a non-const method body in the future would be a breaking change
 
 error: aborting due to 1 previous error
diff --git a/tests/ui/specialization/const_trait_impl.stderr b/tests/ui/specialization/const_trait_impl.stderr
index b9c768812c8..a21a48997ee 100644
--- a/tests/ui/specialization/const_trait_impl.stderr
+++ b/tests/ui/specialization/const_trait_impl.stderr
@@ -1,57 +1,57 @@
-error: `[const]` can only be applied to `#[const_trait]` traits
+error: `[const]` can only be applied to `const` traits
   --> $DIR/const_trait_impl.rs:36:9
    |
 LL | impl<T: [const] Debug> const A for T {
    |         ^^^^^^^ can't be applied to `Debug`
    |
-note: `Debug` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
+note: `Debug` can't be used with `[const]` because it isn't `const`
   --> $SRC_DIR/core/src/fmt/mod.rs:LL:COL
 
-error: `[const]` can only be applied to `#[const_trait]` traits
+error: `[const]` can only be applied to `const` traits
   --> $DIR/const_trait_impl.rs:42:9
    |
 LL | impl<T: [const] Debug + [const] Sup> const A for T {
    |         ^^^^^^^ can't be applied to `Debug`
    |
-note: `Debug` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
+note: `Debug` can't be used with `[const]` because it isn't `const`
   --> $SRC_DIR/core/src/fmt/mod.rs:LL:COL
 
-error: `[const]` can only be applied to `#[const_trait]` traits
+error: `[const]` can only be applied to `const` traits
   --> $DIR/const_trait_impl.rs:48:9
    |
 LL | impl<T: [const] Debug + [const] Sub> const A for T {
    |         ^^^^^^^ can't be applied to `Debug`
    |
-note: `Debug` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
+note: `Debug` can't be used with `[const]` because it isn't `const`
   --> $SRC_DIR/core/src/fmt/mod.rs:LL:COL
 
-error: `[const]` can only be applied to `#[const_trait]` traits
+error: `[const]` can only be applied to `const` traits
   --> $DIR/const_trait_impl.rs:42:9
    |
 LL | impl<T: [const] Debug + [const] Sup> const A for T {
    |         ^^^^^^^ can't be applied to `Debug`
    |
-note: `Debug` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
+note: `Debug` can't be used with `[const]` because it isn't `const`
   --> $SRC_DIR/core/src/fmt/mod.rs:LL:COL
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error: `[const]` can only be applied to `#[const_trait]` traits
+error: `[const]` can only be applied to `const` traits
   --> $DIR/const_trait_impl.rs:36:9
    |
 LL | impl<T: [const] Debug> const A for T {
    |         ^^^^^^^ can't be applied to `Debug`
    |
-note: `Debug` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
+note: `Debug` can't be used with `[const]` because it isn't `const`
   --> $SRC_DIR/core/src/fmt/mod.rs:LL:COL
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error: `[const]` can only be applied to `#[const_trait]` traits
+error: `[const]` can only be applied to `const` traits
   --> $DIR/const_trait_impl.rs:48:9
    |
 LL | impl<T: [const] Debug + [const] Sub> const A for T {
    |         ^^^^^^^ can't be applied to `Debug`
    |
-note: `Debug` can't be used with `[const]` because it isn't annotated with `#[const_trait]`
+note: `Debug` can't be used with `[const]` because it isn't `const`
   --> $SRC_DIR/core/src/fmt/mod.rs:LL:COL
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
diff --git a/tests/ui/stability-attribute/missing-const-stability.rs b/tests/ui/stability-attribute/missing-const-stability.rs
index c3e72e83948..8a37f19ffb0 100644
--- a/tests/ui/stability-attribute/missing-const-stability.rs
+++ b/tests/ui/stability-attribute/missing-const-stability.rs
@@ -20,8 +20,7 @@ impl Foo {
 }
 
 #[stable(feature = "stable", since = "1.0.0")]
-#[const_trait]
-pub trait Bar {
+pub const trait Bar {
 //~^ ERROR trait has missing const stability attribute
     #[stable(feature = "stable", since = "1.0.0")]
     fn fun();
diff --git a/tests/ui/stability-attribute/missing-const-stability.stderr b/tests/ui/stability-attribute/missing-const-stability.stderr
index 09461e6fb54..70a2450c53a 100644
--- a/tests/ui/stability-attribute/missing-const-stability.stderr
+++ b/tests/ui/stability-attribute/missing-const-stability.stderr
@@ -5,9 +5,9 @@ LL | pub const fn foo() {}
    | ^^^^^^^^^^^^^^^^^^^^^
 
 error: trait has missing const stability attribute
-  --> $DIR/missing-const-stability.rs:24:1
+  --> $DIR/missing-const-stability.rs:23:1
    |
-LL | / pub trait Bar {
+LL | / pub const trait Bar {
 LL | |
 LL | |     #[stable(feature = "stable", since = "1.0.0")]
 LL | |     fn fun();
@@ -15,7 +15,7 @@ LL | | }
    | |_^
 
 error: function has missing const stability attribute
-  --> $DIR/missing-const-stability.rs:37:1
+  --> $DIR/missing-const-stability.rs:36:1
    |
 LL | pub const unsafe fn size_of_val<T>(x: *const T) -> usize { 42 }
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/traits/const-traits/conditionally-const-invalid-places.stderr b/tests/ui/traits/const-traits/conditionally-const-invalid-places.stderr
index d0dd9502915..010b1584643 100644
--- a/tests/ui/traits/const-traits/conditionally-const-invalid-places.stderr
+++ b/tests/ui/traits/const-traits/conditionally-const-invalid-places.stderr
@@ -72,7 +72,7 @@ error: `[const]` is not allowed here
 LL |     type Type<T: [const] Trait>: [const] Trait;
    |                  ^^^^^^^
    |
-note: associated types in non-`#[const_trait]` traits cannot have `[const]` trait bounds
+note: associated types in non-`const` traits cannot have `[const]` trait bounds
   --> $DIR/conditionally-const-invalid-places.rs:25:5
    |
 LL |     type Type<T: [const] Trait>: [const] Trait;
@@ -84,7 +84,7 @@ error: `[const]` is not allowed here
 LL |     type Type<T: [const] Trait>: [const] Trait;
    |                                  ^^^^^^^
    |
-note: associated types in non-`#[const_trait]` traits cannot have `[const]` trait bounds
+note: associated types in non-`const` traits cannot have `[const]` trait bounds
   --> $DIR/conditionally-const-invalid-places.rs:25:5
    |
 LL |     type Type<T: [const] Trait>: [const] Trait;
@@ -180,7 +180,7 @@ error: `[const]` is not allowed here
 LL | trait Child0: [const] Trait {}
    |               ^^^^^^^
    |
-note: this trait is not a `#[const_trait]`, so it cannot have `[const]` trait bounds
+note: this trait is not `const`, so it cannot have `[const]` trait bounds
   --> $DIR/conditionally-const-invalid-places.rs:52:1
    |
 LL | trait Child0: [const] Trait {}
@@ -192,7 +192,7 @@ error: `[const]` is not allowed here
 LL | trait Child1 where Self: [const] Trait {}
    |                          ^^^^^^^
    |
-note: this trait is not a `#[const_trait]`, so it cannot have `[const]` trait bounds
+note: this trait is not `const`, so it cannot have `[const]` trait bounds
   --> $DIR/conditionally-const-invalid-places.rs:53:1
    |
 LL | trait Child1 where Self: [const] Trait {}
diff --git a/tests/ui/traits/const-traits/const-bounds-non-const-trait.rs b/tests/ui/traits/const-traits/const-bounds-non-const-trait.rs
index ae31d9ae0ac..baded179201 100644
--- a/tests/ui/traits/const-traits/const-bounds-non-const-trait.rs
+++ b/tests/ui/traits/const-traits/const-bounds-non-const-trait.rs
@@ -4,10 +4,10 @@
 trait NonConst {}
 
 const fn perform<T: [const] NonConst>() {}
-//~^ ERROR `[const]` can only be applied to `#[const_trait]` traits
-//~| ERROR `[const]` can only be applied to `#[const_trait]` traits
+//~^ ERROR `[const]` can only be applied to `const` traits
+//~| ERROR `[const]` can only be applied to `const` traits
 
 fn operate<T: const NonConst>() {}
-//~^ ERROR `const` can only be applied to `#[const_trait]` traits
+//~^ ERROR `const` can only be applied to `const` traits
 
 fn main() {}
diff --git a/tests/ui/traits/const-traits/const-bounds-non-const-trait.stderr b/tests/ui/traits/const-traits/const-bounds-non-const-trait.stderr
index 6c68e4ec3ac..304d81bb917 100644
--- a/tests/ui/traits/const-traits/const-bounds-non-const-trait.stderr
+++ b/tests/ui/traits/const-traits/const-bounds-non-const-trait.stderr
@@ -1,33 +1,33 @@
-error: `[const]` can only be applied to `#[const_trait]` traits
+error: `[const]` can only be applied to `const` traits
   --> $DIR/const-bounds-non-const-trait.rs:6:21
    |
 LL | const fn perform<T: [const] NonConst>() {}
    |                     ^^^^^^^ can't be applied to `NonConst`
    |
-help: mark `NonConst` as `#[const_trait]` to allow it to have `const` implementations
+help: mark `NonConst` as `const` to allow it to have `const` implementations
    |
 LL | #[const_trait] trait NonConst {}
    | ++++++++++++++
 
-error: `[const]` can only be applied to `#[const_trait]` traits
+error: `[const]` can only be applied to `const` traits
   --> $DIR/const-bounds-non-const-trait.rs:6:21
    |
 LL | const fn perform<T: [const] NonConst>() {}
    |                     ^^^^^^^ can't be applied to `NonConst`
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-help: mark `NonConst` as `#[const_trait]` to allow it to have `const` implementations
+help: mark `NonConst` as `const` to allow it to have `const` implementations
    |
 LL | #[const_trait] trait NonConst {}
    | ++++++++++++++
 
-error: `const` can only be applied to `#[const_trait]` traits
+error: `const` can only be applied to `const` traits
   --> $DIR/const-bounds-non-const-trait.rs:10:15
    |
 LL | fn operate<T: const NonConst>() {}
    |               ^^^^^ can't be applied to `NonConst`
    |
-help: mark `NonConst` as `#[const_trait]` to allow it to have `const` implementations
+help: mark `NonConst` as `const` to allow it to have `const` implementations
    |
 LL | #[const_trait] trait NonConst {}
    | ++++++++++++++
diff --git a/tests/ui/traits/const-traits/const-impl-requires-const-trait.rs b/tests/ui/traits/const-traits/const-impl-requires-const-trait.rs
index 6bea664b65f..176ae091a41 100644
--- a/tests/ui/traits/const-traits/const-impl-requires-const-trait.rs
+++ b/tests/ui/traits/const-traits/const-impl-requires-const-trait.rs
@@ -4,6 +4,6 @@
 pub trait A {}
 
 impl const A for () {}
-//~^ ERROR: const `impl` for trait `A` which is not marked with `#[const_trait]`
+//~^ ERROR: const `impl` for trait `A` which is not `const`
 
 fn main() {}
diff --git a/tests/ui/traits/const-traits/const-impl-requires-const-trait.stderr b/tests/ui/traits/const-traits/const-impl-requires-const-trait.stderr
index c728eda069e..bf73436b78d 100644
--- a/tests/ui/traits/const-traits/const-impl-requires-const-trait.stderr
+++ b/tests/ui/traits/const-traits/const-impl-requires-const-trait.stderr
@@ -1,12 +1,12 @@
-error: const `impl` for trait `A` which is not marked with `#[const_trait]`
+error: const `impl` for trait `A` which is not `const`
   --> $DIR/const-impl-requires-const-trait.rs:6:12
    |
 LL | impl const A for () {}
    |            ^ this trait is not `const`
    |
-   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
+   = note: marking a trait with `const` ensures all default method bodies are `const`
    = note: adding a non-const method body in the future would be a breaking change
-help: mark `A` as `#[const_trait]` to allow it to have `const` implementations
+help: mark `A` as `const` to allow it to have `const` implementations
    |
 LL | #[const_trait] pub trait A {}
    | ++++++++++++++
diff --git a/tests/ui/traits/const-traits/const-trait-bounds-trait-objects.rs b/tests/ui/traits/const-traits/const-trait-bounds-trait-objects.rs
index 1d1da9b0e3d..658132441c2 100644
--- a/tests/ui/traits/const-traits/const-trait-bounds-trait-objects.rs
+++ b/tests/ui/traits/const-traits/const-trait-bounds-trait-objects.rs
@@ -1,9 +1,7 @@
 #![feature(const_trait_impl)]
-// FIXME(const_trait_impl) add effects
 //@ edition: 2021
 
-#[const_trait]
-trait Trait {}
+const trait Trait {}
 
 fn main() {
     let _: &dyn const Trait; //~ ERROR const trait bounds are not allowed in trait object types
@@ -14,7 +12,7 @@ fn main() {
 trait NonConst {}
 const fn handle(_: &dyn const NonConst) {}
 //~^ ERROR const trait bounds are not allowed in trait object types
-//~| ERROR `const` can only be applied to `#[const_trait]` traits
+//~| ERROR `const` can only be applied to `const` traits
 const fn take(_: &dyn [const] NonConst) {}
 //~^ ERROR `[const]` is not allowed here
-//~| ERROR `[const]` can only be applied to `#[const_trait]` traits
+//~| ERROR `[const]` can only be applied to `const` traits
diff --git a/tests/ui/traits/const-traits/const-trait-bounds-trait-objects.stderr b/tests/ui/traits/const-traits/const-trait-bounds-trait-objects.stderr
index 06e0493024c..3ba5da39106 100644
--- a/tests/ui/traits/const-traits/const-trait-bounds-trait-objects.stderr
+++ b/tests/ui/traits/const-traits/const-trait-bounds-trait-objects.stderr
@@ -1,11 +1,11 @@
 error: const trait bounds are not allowed in trait object types
-  --> $DIR/const-trait-bounds-trait-objects.rs:9:17
+  --> $DIR/const-trait-bounds-trait-objects.rs:7:17
    |
 LL |     let _: &dyn const Trait;
    |                 ^^^^^^^^^^^
 
 error: `[const]` is not allowed here
-  --> $DIR/const-trait-bounds-trait-objects.rs:10:17
+  --> $DIR/const-trait-bounds-trait-objects.rs:8:17
    |
 LL |     let _: &dyn [const] Trait;
    |                 ^^^^^^^
@@ -13,37 +13,37 @@ LL |     let _: &dyn [const] Trait;
    = note: trait objects cannot have `[const]` trait bounds
 
 error: const trait bounds are not allowed in trait object types
-  --> $DIR/const-trait-bounds-trait-objects.rs:15:25
+  --> $DIR/const-trait-bounds-trait-objects.rs:13:25
    |
 LL | const fn handle(_: &dyn const NonConst) {}
    |                         ^^^^^^^^^^^^^^
 
 error: `[const]` is not allowed here
-  --> $DIR/const-trait-bounds-trait-objects.rs:18:23
+  --> $DIR/const-trait-bounds-trait-objects.rs:16:23
    |
 LL | const fn take(_: &dyn [const] NonConst) {}
    |                       ^^^^^^^
    |
    = note: trait objects cannot have `[const]` trait bounds
 
-error: `const` can only be applied to `#[const_trait]` traits
-  --> $DIR/const-trait-bounds-trait-objects.rs:15:25
+error: `const` can only be applied to `const` traits
+  --> $DIR/const-trait-bounds-trait-objects.rs:13:25
    |
 LL | const fn handle(_: &dyn const NonConst) {}
    |                         ^^^^^ can't be applied to `NonConst`
    |
-help: mark `NonConst` as `#[const_trait]` to allow it to have `const` implementations
+help: mark `NonConst` as `const` to allow it to have `const` implementations
    |
 LL | #[const_trait] trait NonConst {}
    | ++++++++++++++
 
-error: `[const]` can only be applied to `#[const_trait]` traits
-  --> $DIR/const-trait-bounds-trait-objects.rs:18:23
+error: `[const]` can only be applied to `const` traits
+  --> $DIR/const-trait-bounds-trait-objects.rs:16:23
    |
 LL | const fn take(_: &dyn [const] NonConst) {}
    |                       ^^^^^^^ can't be applied to `NonConst`
    |
-help: mark `NonConst` as `#[const_trait]` to allow it to have `const` implementations
+help: mark `NonConst` as `const` to allow it to have `const` implementations
    |
 LL | #[const_trait] trait NonConst {}
    | ++++++++++++++
diff --git a/tests/ui/traits/const-traits/const_derives/derive-const-gate.rs b/tests/ui/traits/const-traits/const_derives/derive-const-gate.rs
index 04fea1189ae..c0796907855 100644
--- a/tests/ui/traits/const-traits/const_derives/derive-const-gate.rs
+++ b/tests/ui/traits/const-traits/const_derives/derive-const-gate.rs
@@ -1,5 +1,5 @@
 #[derive_const(Debug)] //~ ERROR use of unstable library feature
-//~^ ERROR const `impl` for trait `Debug` which is not marked with `#[const_trait]`
+//~^ ERROR const `impl` for trait `Debug` which is not `const`
 //~| ERROR cannot call non-const method
 pub struct S;
 
diff --git a/tests/ui/traits/const-traits/const_derives/derive-const-gate.stderr b/tests/ui/traits/const-traits/const_derives/derive-const-gate.stderr
index 5bde358001c..5ed12b37052 100644
--- a/tests/ui/traits/const-traits/const_derives/derive-const-gate.stderr
+++ b/tests/ui/traits/const-traits/const_derives/derive-const-gate.stderr
@@ -7,13 +7,13 @@ LL | #[derive_const(Debug)]
    = help: add `#![feature(derive_const)]` 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 `Debug` which is not marked with `#[const_trait]`
+error: const `impl` for trait `Debug` which is not `const`
   --> $DIR/derive-const-gate.rs:1:16
    |
 LL | #[derive_const(Debug)]
    |                ^^^^^ this trait is not `const`
    |
-   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
+   = note: marking a trait with `const` ensures all default method bodies are `const`
    = note: adding a non-const method body in the future would be a breaking change
 
 error[E0015]: cannot call non-const method `Formatter::<'_>::write_str` in constant functions
diff --git a/tests/ui/traits/const-traits/const_derives/derive-const-non-const-type.stderr b/tests/ui/traits/const-traits/const_derives/derive-const-non-const-type.stderr
index c0bd360ebe5..93638801895 100644
--- a/tests/ui/traits/const-traits/const_derives/derive-const-non-const-type.stderr
+++ b/tests/ui/traits/const-traits/const_derives/derive-const-non-const-type.stderr
@@ -1,10 +1,10 @@
-error: const `impl` for trait `Debug` which is not marked with `#[const_trait]`
+error: const `impl` for trait `Debug` which is not `const`
   --> $DIR/derive-const-non-const-type.rs:12:16
    |
 LL | #[derive_const(Debug)]
    |                ^^^^^ this trait is not `const`
    |
-   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
+   = note: marking a trait with `const` ensures all default method bodies are `const`
    = note: adding a non-const method body in the future would be a breaking change
 
 error[E0015]: cannot call non-const method `Formatter::<'_>::debug_tuple_field1_finish` in constant functions
diff --git a/tests/ui/traits/const-traits/ice-119717-constant-lifetime.rs b/tests/ui/traits/const-traits/ice-119717-constant-lifetime.rs
index e53b87274d3..47c85980aca 100644
--- a/tests/ui/traits/const-traits/ice-119717-constant-lifetime.rs
+++ b/tests/ui/traits/const-traits/ice-119717-constant-lifetime.rs
@@ -4,7 +4,7 @@
 use std::ops::FromResidual;
 
 impl<T> const FromResidual for T {
-    //~^ ERROR const `impl` for trait `FromResidual` which is not marked with `#[const_trait]`
+    //~^ ERROR const `impl` for trait `FromResidual` which is not `const`
     //~| ERROR type parameter `T` must be used as the type parameter for some local type
     fn from_residual(t: T) -> _ {
         //~^ ERROR the placeholder `_` is not allowed
diff --git a/tests/ui/traits/const-traits/ice-119717-constant-lifetime.stderr b/tests/ui/traits/const-traits/ice-119717-constant-lifetime.stderr
index a165ef12060..5c5fba95f02 100644
--- a/tests/ui/traits/const-traits/ice-119717-constant-lifetime.stderr
+++ b/tests/ui/traits/const-traits/ice-119717-constant-lifetime.stderr
@@ -1,10 +1,10 @@
-error: const `impl` for trait `FromResidual` which is not marked with `#[const_trait]`
+error: const `impl` for trait `FromResidual` which is not `const`
   --> $DIR/ice-119717-constant-lifetime.rs:6:15
    |
 LL | impl<T> const FromResidual for T {
    |               ^^^^^^^^^^^^ this trait is not `const`
    |
-   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
+   = note: marking a trait with `const` ensures all default method bodies are `const`
    = note: adding a non-const method body in the future would be a breaking change
 
 error[E0210]: type parameter `T` must be used as the type parameter for some local type (e.g., `MyStruct<T>`)
diff --git a/tests/ui/traits/const-traits/ice-126148-failed-to-normalize.rs b/tests/ui/traits/const-traits/ice-126148-failed-to-normalize.rs
index 3473be565c1..5e368b9e6a9 100644
--- a/tests/ui/traits/const-traits/ice-126148-failed-to-normalize.rs
+++ b/tests/ui/traits/const-traits/ice-126148-failed-to-normalize.rs
@@ -6,11 +6,11 @@ struct TryMe;
 struct Error;
 
 impl const FromResidual<Error> for TryMe {}
-//~^ ERROR const `impl` for trait `FromResidual` which is not marked with `#[const_trait]`
+//~^ ERROR const `impl` for trait `FromResidual` which is not `const`
 //~| ERROR not all trait items implemented
 
 impl const Try for TryMe {
-    //~^ ERROR const `impl` for trait `Try` which is not marked with `#[const_trait]`
+    //~^ ERROR const `impl` for trait `Try` which is not `const`
     //~| ERROR not all trait items implemented
     type Output = ();
     type Residual = Error;
diff --git a/tests/ui/traits/const-traits/ice-126148-failed-to-normalize.stderr b/tests/ui/traits/const-traits/ice-126148-failed-to-normalize.stderr
index 41f99c2d375..849d6522cd6 100644
--- a/tests/ui/traits/const-traits/ice-126148-failed-to-normalize.stderr
+++ b/tests/ui/traits/const-traits/ice-126148-failed-to-normalize.stderr
@@ -1,10 +1,10 @@
-error: const `impl` for trait `FromResidual` which is not marked with `#[const_trait]`
+error: const `impl` for trait `FromResidual` which is not `const`
   --> $DIR/ice-126148-failed-to-normalize.rs:8:12
    |
 LL | impl const FromResidual<Error> for TryMe {}
    |            ^^^^^^^^^^^^^^^^^^^ this trait is not `const`
    |
-   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
+   = note: marking a trait with `const` 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: `from_residual`
@@ -15,13 +15,13 @@ LL | impl const FromResidual<Error> for TryMe {}
    |
    = help: implement the missing item: `fn from_residual(_: Error) -> Self { todo!() }`
 
-error: const `impl` for trait `Try` which is not marked with `#[const_trait]`
+error: const `impl` for trait `Try` which is not `const`
   --> $DIR/ice-126148-failed-to-normalize.rs:12:12
    |
 LL | impl const Try for TryMe {
    |            ^^^ this trait is not `const`
    |
-   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
+   = note: marking a trait with `const` 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: `from_output`, `branch`
diff --git a/tests/ui/traits/const-traits/spec-effectvar-ice.rs b/tests/ui/traits/const-traits/spec-effectvar-ice.rs
index c85b1746967..46f71b114a3 100644
--- a/tests/ui/traits/const-traits/spec-effectvar-ice.rs
+++ b/tests/ui/traits/const-traits/spec-effectvar-ice.rs
@@ -8,11 +8,11 @@ trait Specialize {}
 trait Foo {}
 
 impl<T> const Foo for T {}
-//~^ error: const `impl` for trait `Foo` which is not marked with `#[const_trait]`
+//~^ error: const `impl` for trait `Foo` which is not `const`
 
 impl<T> const Foo for T where T: const Specialize {}
-//~^ error: const `impl` for trait `Foo` which is not marked with `#[const_trait]`
-//~| error: `const` can only be applied to `#[const_trait]` traits
+//~^ error: const `impl` for trait `Foo` which is not `const`
+//~| error: `const` can only be applied to `const` traits
 //~| error: specialization impl does not specialize any associated items
 //~| error: cannot specialize on trait `Specialize`
 
diff --git a/tests/ui/traits/const-traits/spec-effectvar-ice.stderr b/tests/ui/traits/const-traits/spec-effectvar-ice.stderr
index 474d96698d5..ef5e58e1c3d 100644
--- a/tests/ui/traits/const-traits/spec-effectvar-ice.stderr
+++ b/tests/ui/traits/const-traits/spec-effectvar-ice.stderr
@@ -1,36 +1,36 @@
-error: const `impl` for trait `Foo` which is not marked with `#[const_trait]`
+error: const `impl` for trait `Foo` which is not `const`
   --> $DIR/spec-effectvar-ice.rs:10:15
    |
 LL | impl<T> const Foo for T {}
    |               ^^^ this trait is not `const`
    |
-   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
+   = note: marking a trait with `const` ensures all default method bodies are `const`
    = note: adding a non-const method body in the future would be a breaking change
-help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
+help: mark `Foo` as `const` to allow it to have `const` implementations
    |
 LL | #[const_trait] trait Foo {}
    | ++++++++++++++
 
-error: const `impl` for trait `Foo` which is not marked with `#[const_trait]`
+error: const `impl` for trait `Foo` which is not `const`
   --> $DIR/spec-effectvar-ice.rs:13:15
    |
 LL | impl<T> const Foo for T where T: const Specialize {}
    |               ^^^ this trait is not `const`
    |
-   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
+   = note: marking a trait with `const` ensures all default method bodies are `const`
    = note: adding a non-const method body in the future would be a breaking change
-help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
+help: mark `Foo` as `const` to allow it to have `const` implementations
    |
 LL | #[const_trait] trait Foo {}
    | ++++++++++++++
 
-error: `const` can only be applied to `#[const_trait]` traits
+error: `const` can only be applied to `const` traits
   --> $DIR/spec-effectvar-ice.rs:13:34
    |
 LL | impl<T> const Foo for T where T: const Specialize {}
    |                                  ^^^^^ can't be applied to `Specialize`
    |
-help: mark `Specialize` as `#[const_trait]` to allow it to have `const` implementations
+help: mark `Specialize` as `const` to allow it to have `const` implementations
    |
 LL | #[const_trait] trait Specialize {}
    | ++++++++++++++
diff --git a/tests/ui/traits/const-traits/super-traits-fail-2.nn.stderr b/tests/ui/traits/const-traits/super-traits-fail-2.nn.stderr
index 19f072b289e..0ecbad64bc8 100644
--- a/tests/ui/traits/const-traits/super-traits-fail-2.nn.stderr
+++ b/tests/ui/traits/const-traits/super-traits-fail-2.nn.stderr
@@ -4,43 +4,43 @@ error: `[const]` is not allowed here
 LL | trait Bar: [const] Foo {}
    |            ^^^^^^^
    |
-note: this trait is not a `#[const_trait]`, so it cannot have `[const]` trait bounds
+note: this trait is not `const`, so it cannot have `[const]` trait bounds
   --> $DIR/super-traits-fail-2.rs:11:1
    |
 LL | trait Bar: [const] Foo {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: `[const]` can only be applied to `#[const_trait]` traits
+error: `[const]` can only be applied to `const` traits
   --> $DIR/super-traits-fail-2.rs:11:12
    |
 LL | trait Bar: [const] Foo {}
    |            ^^^^^^^ can't be applied to `Foo`
    |
-help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
+help: mark `Foo` as `const` to allow it to have `const` implementations
    |
 LL | #[const_trait] trait Foo {
    | ++++++++++++++
 
-error: `[const]` can only be applied to `#[const_trait]` traits
+error: `[const]` can only be applied to `const` traits
   --> $DIR/super-traits-fail-2.rs:11:12
    |
 LL | trait Bar: [const] Foo {}
    |            ^^^^^^^ can't be applied to `Foo`
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
+help: mark `Foo` as `const` to allow it to have `const` implementations
    |
 LL | #[const_trait] trait Foo {
    | ++++++++++++++
 
-error: `[const]` can only be applied to `#[const_trait]` traits
+error: `[const]` can only be applied to `const` traits
   --> $DIR/super-traits-fail-2.rs:11:12
    |
 LL | trait Bar: [const] Foo {}
    |            ^^^^^^^ can't be applied to `Foo`
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
+help: mark `Foo` as `const` to allow it to have `const` implementations
    |
 LL | #[const_trait] trait Foo {
    | ++++++++++++++
diff --git a/tests/ui/traits/const-traits/super-traits-fail-2.ny.stderr b/tests/ui/traits/const-traits/super-traits-fail-2.ny.stderr
index 4921f78d3ac..0e5b697d1dd 100644
--- a/tests/ui/traits/const-traits/super-traits-fail-2.ny.stderr
+++ b/tests/ui/traits/const-traits/super-traits-fail-2.ny.stderr
@@ -1,58 +1,58 @@
-error: `[const]` can only be applied to `#[const_trait]` traits
+error: `[const]` can only be applied to `const` traits
   --> $DIR/super-traits-fail-2.rs:11:12
    |
 LL | trait Bar: [const] Foo {}
    |            ^^^^^^^ can't be applied to `Foo`
    |
-help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
+help: mark `Foo` as `const` to allow it to have `const` implementations
    |
 LL | #[const_trait] trait Foo {
    | ++++++++++++++
 
-error: `[const]` can only be applied to `#[const_trait]` traits
+error: `[const]` can only be applied to `const` traits
   --> $DIR/super-traits-fail-2.rs:11:12
    |
 LL | trait Bar: [const] Foo {}
    |            ^^^^^^^ can't be applied to `Foo`
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
+help: mark `Foo` as `const` to allow it to have `const` implementations
    |
 LL | #[const_trait] trait Foo {
    | ++++++++++++++
 
-error: `[const]` can only be applied to `#[const_trait]` traits
+error: `[const]` can only be applied to `const` traits
   --> $DIR/super-traits-fail-2.rs:11:12
    |
 LL | trait Bar: [const] Foo {}
    |            ^^^^^^^ can't be applied to `Foo`
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
+help: mark `Foo` as `const` to allow it to have `const` implementations
    |
 LL | #[const_trait] trait Foo {
    | ++++++++++++++
 
-error: `[const]` can only be applied to `#[const_trait]` traits
+error: `[const]` can only be applied to `const` traits
   --> $DIR/super-traits-fail-2.rs:11:12
    |
 LL | trait Bar: [const] Foo {}
    |            ^^^^^^^ can't be applied to `Foo`
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
+help: mark `Foo` as `const` to allow it to have `const` implementations
    |
 LL | #[const_trait] trait Foo {
    | ++++++++++++++
 
-error: `[const]` can only be applied to `#[const_trait]` traits
+error: `[const]` can only be applied to `const` traits
   --> $DIR/super-traits-fail-2.rs:11:12
    |
 LL | trait Bar: [const] Foo {}
    |            ^^^^^^^ can't be applied to `Foo`
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
+help: mark `Foo` as `const` to allow it to have `const` implementations
    |
 LL | #[const_trait] trait Foo {
    | ++++++++++++++
diff --git a/tests/ui/traits/const-traits/super-traits-fail-2.rs b/tests/ui/traits/const-traits/super-traits-fail-2.rs
index 781dacb81a1..36e7c1c4e4a 100644
--- a/tests/ui/traits/const-traits/super-traits-fail-2.rs
+++ b/tests/ui/traits/const-traits/super-traits-fail-2.rs
@@ -9,11 +9,11 @@ trait Foo {
 
 #[cfg_attr(any(yy, ny), const_trait)]
 trait Bar: [const] Foo {}
-//[ny,nn]~^ ERROR: `[const]` can only be applied to `#[const_trait]`
-//[ny,nn]~| ERROR: `[const]` can only be applied to `#[const_trait]`
-//[ny,nn]~| ERROR: `[const]` can only be applied to `#[const_trait]`
-//[ny]~| ERROR: `[const]` can only be applied to `#[const_trait]`
-//[ny]~| ERROR: `[const]` can only be applied to `#[const_trait]`
+//[ny,nn]~^ ERROR: `[const]` can only be applied to `const` traits
+//[ny,nn]~| ERROR: `[const]` can only be applied to `const` traits
+//[ny,nn]~| ERROR: `[const]` can only be applied to `const` traits
+//[ny]~| ERROR: `[const]` can only be applied to `const` traits
+//[ny]~| ERROR: `[const]` can only be applied to `const` traits
 //[yn,nn]~^^^^^^ ERROR: `[const]` is not allowed here
 
 const fn foo<T: Bar>(x: &T) {
diff --git a/tests/ui/traits/const-traits/super-traits-fail-2.yn.stderr b/tests/ui/traits/const-traits/super-traits-fail-2.yn.stderr
index a151349822e..657e8ee82e3 100644
--- a/tests/ui/traits/const-traits/super-traits-fail-2.yn.stderr
+++ b/tests/ui/traits/const-traits/super-traits-fail-2.yn.stderr
@@ -4,7 +4,7 @@ error: `[const]` is not allowed here
 LL | trait Bar: [const] Foo {}
    |            ^^^^^^^
    |
-note: this trait is not a `#[const_trait]`, so it cannot have `[const]` trait bounds
+note: this trait is not `const`, so it cannot have `[const]` trait bounds
   --> $DIR/super-traits-fail-2.rs:11:1
    |
 LL | trait Bar: [const] Foo {}
diff --git a/tests/ui/traits/const-traits/super-traits-fail-3.nnn.stderr b/tests/ui/traits/const-traits/super-traits-fail-3.nnn.stderr
index 3f48375dd04..a0ae60526ef 100644
--- a/tests/ui/traits/const-traits/super-traits-fail-3.nnn.stderr
+++ b/tests/ui/traits/const-traits/super-traits-fail-3.nnn.stderr
@@ -4,7 +4,7 @@ error: `[const]` is not allowed here
 LL | trait Bar: [const] Foo {}
    |            ^^^^^^^
    |
-note: this trait is not a `#[const_trait]`, so it cannot have `[const]` trait bounds
+note: this trait is not `const`, so it cannot have `[const]` trait bounds
   --> $DIR/super-traits-fail-3.rs:23:1
    |
 LL | trait Bar: [const] Foo {}
@@ -30,60 +30,60 @@ LL | const fn foo<T: [const] Bar>(x: &T) {
    = 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]` can only be applied to `#[const_trait]` traits
+error: `[const]` can only be applied to `const` traits
   --> $DIR/super-traits-fail-3.rs:23:12
    |
 LL | trait Bar: [const] Foo {}
    |            ^^^^^^^ can't be applied to `Foo`
    |
-help: enable `#![feature(const_trait_impl)]` in your crate and mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
+help: enable `#![feature(const_trait_impl)]` in your crate and mark `Foo` as `const` to allow it to have `const` implementations
    |
 LL | #[const_trait] trait Foo {
    | ++++++++++++++
 
-error: `[const]` can only be applied to `#[const_trait]` traits
+error: `[const]` can only be applied to `const` traits
   --> $DIR/super-traits-fail-3.rs:23:12
    |
 LL | trait Bar: [const] Foo {}
    |            ^^^^^^^ can't be applied to `Foo`
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-help: enable `#![feature(const_trait_impl)]` in your crate and mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
+help: enable `#![feature(const_trait_impl)]` in your crate and mark `Foo` as `const` to allow it to have `const` implementations
    |
 LL | #[const_trait] trait Foo {
    | ++++++++++++++
 
-error: `[const]` can only be applied to `#[const_trait]` traits
+error: `[const]` can only be applied to `const` traits
   --> $DIR/super-traits-fail-3.rs:23:12
    |
 LL | trait Bar: [const] Foo {}
    |            ^^^^^^^ can't be applied to `Foo`
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-help: enable `#![feature(const_trait_impl)]` in your crate and mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
+help: enable `#![feature(const_trait_impl)]` in your crate and mark `Foo` as `const` to allow it to have `const` implementations
    |
 LL | #[const_trait] trait Foo {
    | ++++++++++++++
 
-error: `[const]` can only be applied to `#[const_trait]` traits
+error: `[const]` can only be applied to `const` traits
   --> $DIR/super-traits-fail-3.rs:32:17
    |
 LL | const fn foo<T: [const] Bar>(x: &T) {
    |                 ^^^^^^^ can't be applied to `Bar`
    |
-help: enable `#![feature(const_trait_impl)]` in your crate and mark `Bar` as `#[const_trait]` to allow it to have `const` implementations
+help: enable `#![feature(const_trait_impl)]` in your crate and mark `Bar` as `const` to allow it to have `const` implementations
    |
 LL | #[const_trait] trait Bar: [const] Foo {}
    | ++++++++++++++
 
-error: `[const]` can only be applied to `#[const_trait]` traits
+error: `[const]` can only be applied to `const` traits
   --> $DIR/super-traits-fail-3.rs:32:17
    |
 LL | const fn foo<T: [const] Bar>(x: &T) {
    |                 ^^^^^^^ can't be applied to `Bar`
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-help: enable `#![feature(const_trait_impl)]` in your crate and mark `Bar` as `#[const_trait]` to allow it to have `const` implementations
+help: enable `#![feature(const_trait_impl)]` in your crate and mark `Bar` as `const` to allow it to have `const` implementations
    |
 LL | #[const_trait] trait Bar: [const] Foo {}
    | ++++++++++++++
diff --git a/tests/ui/traits/const-traits/super-traits-fail-3.nny.stderr b/tests/ui/traits/const-traits/super-traits-fail-3.nny.stderr
index 3f48375dd04..a0ae60526ef 100644
--- a/tests/ui/traits/const-traits/super-traits-fail-3.nny.stderr
+++ b/tests/ui/traits/const-traits/super-traits-fail-3.nny.stderr
@@ -4,7 +4,7 @@ error: `[const]` is not allowed here
 LL | trait Bar: [const] Foo {}
    |            ^^^^^^^
    |
-note: this trait is not a `#[const_trait]`, so it cannot have `[const]` trait bounds
+note: this trait is not `const`, so it cannot have `[const]` trait bounds
   --> $DIR/super-traits-fail-3.rs:23:1
    |
 LL | trait Bar: [const] Foo {}
@@ -30,60 +30,60 @@ LL | const fn foo<T: [const] Bar>(x: &T) {
    = 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]` can only be applied to `#[const_trait]` traits
+error: `[const]` can only be applied to `const` traits
   --> $DIR/super-traits-fail-3.rs:23:12
    |
 LL | trait Bar: [const] Foo {}
    |            ^^^^^^^ can't be applied to `Foo`
    |
-help: enable `#![feature(const_trait_impl)]` in your crate and mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
+help: enable `#![feature(const_trait_impl)]` in your crate and mark `Foo` as `const` to allow it to have `const` implementations
    |
 LL | #[const_trait] trait Foo {
    | ++++++++++++++
 
-error: `[const]` can only be applied to `#[const_trait]` traits
+error: `[const]` can only be applied to `const` traits
   --> $DIR/super-traits-fail-3.rs:23:12
    |
 LL | trait Bar: [const] Foo {}
    |            ^^^^^^^ can't be applied to `Foo`
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-help: enable `#![feature(const_trait_impl)]` in your crate and mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
+help: enable `#![feature(const_trait_impl)]` in your crate and mark `Foo` as `const` to allow it to have `const` implementations
    |
 LL | #[const_trait] trait Foo {
    | ++++++++++++++
 
-error: `[const]` can only be applied to `#[const_trait]` traits
+error: `[const]` can only be applied to `const` traits
   --> $DIR/super-traits-fail-3.rs:23:12
    |
 LL | trait Bar: [const] Foo {}
    |            ^^^^^^^ can't be applied to `Foo`
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-help: enable `#![feature(const_trait_impl)]` in your crate and mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
+help: enable `#![feature(const_trait_impl)]` in your crate and mark `Foo` as `const` to allow it to have `const` implementations
    |
 LL | #[const_trait] trait Foo {
    | ++++++++++++++
 
-error: `[const]` can only be applied to `#[const_trait]` traits
+error: `[const]` can only be applied to `const` traits
   --> $DIR/super-traits-fail-3.rs:32:17
    |
 LL | const fn foo<T: [const] Bar>(x: &T) {
    |                 ^^^^^^^ can't be applied to `Bar`
    |
-help: enable `#![feature(const_trait_impl)]` in your crate and mark `Bar` as `#[const_trait]` to allow it to have `const` implementations
+help: enable `#![feature(const_trait_impl)]` in your crate and mark `Bar` as `const` to allow it to have `const` implementations
    |
 LL | #[const_trait] trait Bar: [const] Foo {}
    | ++++++++++++++
 
-error: `[const]` can only be applied to `#[const_trait]` traits
+error: `[const]` can only be applied to `const` traits
   --> $DIR/super-traits-fail-3.rs:32:17
    |
 LL | const fn foo<T: [const] Bar>(x: &T) {
    |                 ^^^^^^^ can't be applied to `Bar`
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-help: enable `#![feature(const_trait_impl)]` in your crate and mark `Bar` as `#[const_trait]` to allow it to have `const` implementations
+help: enable `#![feature(const_trait_impl)]` in your crate and mark `Bar` as `const` to allow it to have `const` implementations
    |
 LL | #[const_trait] trait Bar: [const] Foo {}
    | ++++++++++++++
diff --git a/tests/ui/traits/const-traits/super-traits-fail-3.rs b/tests/ui/traits/const-traits/super-traits-fail-3.rs
index 5370f607dec..d74bd346784 100644
--- a/tests/ui/traits/const-traits/super-traits-fail-3.rs
+++ b/tests/ui/traits/const-traits/super-traits-fail-3.rs
@@ -21,17 +21,17 @@ trait Foo {
 #[cfg_attr(any(yyy, yny, nyy, nyn), const_trait)]
 //[nyy,nyn]~^ ERROR: `const_trait` is a temporary placeholder for marking a trait that is suitable for `const` `impls` and all default bodies as `const`, which may be removed or renamed in the future
 trait Bar: [const] Foo {}
-//[yny,ynn,nny,nnn]~^ ERROR: `[const]` can only be applied to `#[const_trait]`
-//[yny,ynn,nny,nnn]~| ERROR: `[const]` can only be applied to `#[const_trait]`
-//[yny,ynn,nny,nnn]~| ERROR: `[const]` can only be applied to `#[const_trait]`
-//[yny]~^^^^ ERROR: `[const]` can only be applied to `#[const_trait]`
-//[yny]~| ERROR: `[const]` can only be applied to `#[const_trait]`
+//[yny,ynn,nny,nnn]~^ ERROR: `[const]` can only be applied to `const` traits
+//[yny,ynn,nny,nnn]~| ERROR: `[const]` can only be applied to `const` traits
+//[yny,ynn,nny,nnn]~| ERROR: `[const]` can only be applied to `const` traits
+//[yny]~^^^^ ERROR: `[const]` can only be applied to `const` traits
+//[yny]~| ERROR: `[const]` can only be applied to `const` traits
 //[yyn,ynn,nny,nnn]~^^^^^^ ERROR: `[const]` is not allowed here
 //[nyy,nyn,nny,nnn]~^^^^^^^ ERROR: const trait impls are experimental
 
 const fn foo<T: [const] Bar>(x: &T) {
-    //[yyn,ynn,nny,nnn]~^ ERROR: `[const]` can only be applied to `#[const_trait]`
-    //[yyn,ynn,nny,nnn]~| ERROR: `[const]` can only be applied to `#[const_trait]`
+    //[yyn,ynn,nny,nnn]~^ ERROR: `[const]` can only be applied to `const` traits
+    //[yyn,ynn,nny,nnn]~| ERROR: `[const]` can only be applied to `const` traits
     //[nyy,nyn,nny,nnn]~^^^ ERROR: const trait impls are experimental
     x.a();
     //[yyn]~^ ERROR: the trait bound `T: [const] Foo` is not satisfied
diff --git a/tests/ui/traits/const-traits/super-traits-fail-3.ynn.stderr b/tests/ui/traits/const-traits/super-traits-fail-3.ynn.stderr
index 89e090b7d1c..c8ec77c2f09 100644
--- a/tests/ui/traits/const-traits/super-traits-fail-3.ynn.stderr
+++ b/tests/ui/traits/const-traits/super-traits-fail-3.ynn.stderr
@@ -4,66 +4,66 @@ error: `[const]` is not allowed here
 LL | trait Bar: [const] Foo {}
    |            ^^^^^^^
    |
-note: this trait is not a `#[const_trait]`, so it cannot have `[const]` trait bounds
+note: this trait is not `const`, so it cannot have `[const]` trait bounds
   --> $DIR/super-traits-fail-3.rs:23:1
    |
 LL | trait Bar: [const] Foo {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: `[const]` can only be applied to `#[const_trait]` traits
+error: `[const]` can only be applied to `const` traits
   --> $DIR/super-traits-fail-3.rs:23:12
    |
 LL | trait Bar: [const] Foo {}
    |            ^^^^^^^ can't be applied to `Foo`
    |
-help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
+help: mark `Foo` as `const` to allow it to have `const` implementations
    |
 LL | #[const_trait] trait Foo {
    | ++++++++++++++
 
-error: `[const]` can only be applied to `#[const_trait]` traits
+error: `[const]` can only be applied to `const` traits
   --> $DIR/super-traits-fail-3.rs:23:12
    |
 LL | trait Bar: [const] Foo {}
    |            ^^^^^^^ can't be applied to `Foo`
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
+help: mark `Foo` as `const` to allow it to have `const` implementations
    |
 LL | #[const_trait] trait Foo {
    | ++++++++++++++
 
-error: `[const]` can only be applied to `#[const_trait]` traits
+error: `[const]` can only be applied to `const` traits
   --> $DIR/super-traits-fail-3.rs:23:12
    |
 LL | trait Bar: [const] Foo {}
    |            ^^^^^^^ can't be applied to `Foo`
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
+help: mark `Foo` as `const` to allow it to have `const` implementations
    |
 LL | #[const_trait] trait Foo {
    | ++++++++++++++
 
-error: `[const]` can only be applied to `#[const_trait]` traits
+error: `[const]` can only be applied to `const` traits
   --> $DIR/super-traits-fail-3.rs:32:17
    |
 LL | const fn foo<T: [const] Bar>(x: &T) {
    |                 ^^^^^^^ can't be applied to `Bar`
    |
-help: mark `Bar` as `#[const_trait]` to allow it to have `const` implementations
+help: mark `Bar` as `const` to allow it to have `const` implementations
    |
 LL | #[const_trait] trait Bar: [const] Foo {}
    | ++++++++++++++
 
-error: `[const]` can only be applied to `#[const_trait]` traits
+error: `[const]` can only be applied to `const` traits
   --> $DIR/super-traits-fail-3.rs:32:17
    |
 LL | const fn foo<T: [const] Bar>(x: &T) {
    |                 ^^^^^^^ can't be applied to `Bar`
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-help: mark `Bar` as `#[const_trait]` to allow it to have `const` implementations
+help: mark `Bar` as `const` to allow it to have `const` implementations
    |
 LL | #[const_trait] trait Bar: [const] Foo {}
    | ++++++++++++++
diff --git a/tests/ui/traits/const-traits/super-traits-fail-3.yny.stderr b/tests/ui/traits/const-traits/super-traits-fail-3.yny.stderr
index 683eeb73850..a820239cde0 100644
--- a/tests/ui/traits/const-traits/super-traits-fail-3.yny.stderr
+++ b/tests/ui/traits/const-traits/super-traits-fail-3.yny.stderr
@@ -1,58 +1,58 @@
-error: `[const]` can only be applied to `#[const_trait]` traits
+error: `[const]` can only be applied to `const` traits
   --> $DIR/super-traits-fail-3.rs:23:12
    |
 LL | trait Bar: [const] Foo {}
    |            ^^^^^^^ can't be applied to `Foo`
    |
-help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
+help: mark `Foo` as `const` to allow it to have `const` implementations
    |
 LL | #[const_trait] trait Foo {
    | ++++++++++++++
 
-error: `[const]` can only be applied to `#[const_trait]` traits
+error: `[const]` can only be applied to `const` traits
   --> $DIR/super-traits-fail-3.rs:23:12
    |
 LL | trait Bar: [const] Foo {}
    |            ^^^^^^^ can't be applied to `Foo`
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
+help: mark `Foo` as `const` to allow it to have `const` implementations
    |
 LL | #[const_trait] trait Foo {
    | ++++++++++++++
 
-error: `[const]` can only be applied to `#[const_trait]` traits
+error: `[const]` can only be applied to `const` traits
   --> $DIR/super-traits-fail-3.rs:23:12
    |
 LL | trait Bar: [const] Foo {}
    |            ^^^^^^^ can't be applied to `Foo`
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
+help: mark `Foo` as `const` to allow it to have `const` implementations
    |
 LL | #[const_trait] trait Foo {
    | ++++++++++++++
 
-error: `[const]` can only be applied to `#[const_trait]` traits
+error: `[const]` can only be applied to `const` traits
   --> $DIR/super-traits-fail-3.rs:23:12
    |
 LL | trait Bar: [const] Foo {}
    |            ^^^^^^^ can't be applied to `Foo`
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
+help: mark `Foo` as `const` to allow it to have `const` implementations
    |
 LL | #[const_trait] trait Foo {
    | ++++++++++++++
 
-error: `[const]` can only be applied to `#[const_trait]` traits
+error: `[const]` can only be applied to `const` traits
   --> $DIR/super-traits-fail-3.rs:23:12
    |
 LL | trait Bar: [const] Foo {}
    |            ^^^^^^^ can't be applied to `Foo`
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-help: mark `Foo` as `#[const_trait]` to allow it to have `const` implementations
+help: mark `Foo` as `const` to allow it to have `const` implementations
    |
 LL | #[const_trait] trait Foo {
    | ++++++++++++++
diff --git a/tests/ui/traits/const-traits/super-traits-fail-3.yyn.stderr b/tests/ui/traits/const-traits/super-traits-fail-3.yyn.stderr
index 39cfdfe2030..de3664dae84 100644
--- a/tests/ui/traits/const-traits/super-traits-fail-3.yyn.stderr
+++ b/tests/ui/traits/const-traits/super-traits-fail-3.yyn.stderr
@@ -4,31 +4,31 @@ error: `[const]` is not allowed here
 LL | trait Bar: [const] Foo {}
    |            ^^^^^^^
    |
-note: this trait is not a `#[const_trait]`, so it cannot have `[const]` trait bounds
+note: this trait is not `const`, so it cannot have `[const]` trait bounds
   --> $DIR/super-traits-fail-3.rs:23:1
    |
 LL | trait Bar: [const] Foo {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: `[const]` can only be applied to `#[const_trait]` traits
+error: `[const]` can only be applied to `const` traits
   --> $DIR/super-traits-fail-3.rs:32:17
    |
 LL | const fn foo<T: [const] Bar>(x: &T) {
    |                 ^^^^^^^ can't be applied to `Bar`
    |
-help: mark `Bar` as `#[const_trait]` to allow it to have `const` implementations
+help: mark `Bar` as `const` to allow it to have `const` implementations
    |
 LL | #[const_trait] trait Bar: [const] Foo {}
    | ++++++++++++++
 
-error: `[const]` can only be applied to `#[const_trait]` traits
+error: `[const]` can only be applied to `const` traits
   --> $DIR/super-traits-fail-3.rs:32:17
    |
 LL | const fn foo<T: [const] Bar>(x: &T) {
    |                 ^^^^^^^ can't be applied to `Bar`
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-help: mark `Bar` as `#[const_trait]` to allow it to have `const` implementations
+help: mark `Bar` as `const` to allow it to have `const` implementations
    |
 LL | #[const_trait] trait Bar: [const] Foo {}
    | ++++++++++++++
diff --git a/tests/ui/traits/const-traits/trait-default-body-stability.stderr b/tests/ui/traits/const-traits/trait-default-body-stability.stderr
index a13d9a1e075..b995d6f4f3d 100644
--- a/tests/ui/traits/const-traits/trait-default-body-stability.stderr
+++ b/tests/ui/traits/const-traits/trait-default-body-stability.stderr
@@ -1,19 +1,19 @@
-error: const `impl` for trait `Try` which is not marked with `#[const_trait]`
+error: const `impl` for trait `Try` which is not `const`
   --> $DIR/trait-default-body-stability.rs:19:12
    |
 LL | impl const Try for T {
    |            ^^^ this trait is not `const`
    |
-   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
+   = note: marking a trait with `const` 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 `FromResidual` which is not marked with `#[const_trait]`
+error: const `impl` for trait `FromResidual` which is not `const`
   --> $DIR/trait-default-body-stability.rs:34:12
    |
 LL | impl const FromResidual for T {
    |            ^^^^^^^^^^^^ this trait is not `const`
    |
-   = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
+   = note: marking a trait with `const` ensures all default method bodies are `const`
    = note: adding a non-const method body in the future would be a breaking change
 
 error[E0015]: `?` is not allowed on `T` in constant functions