about summary refs log tree commit diff
path: root/tests/ui/traits/const-traits/const-trait-bounds-trait-objects.rs
diff options
context:
space:
mode:
authorTshepang Mbambo <hopsi@tuta.io>2025-07-21 11:16:20 +0200
committerGitHub <noreply@github.com>2025-07-21 11:16:20 +0200
commit62e3a05291ef782cf212675d9e13c0b937c788c8 (patch)
tree57ddd8cbcb5f32bd2773165cc53b9c69d65ed720 /tests/ui/traits/const-traits/const-trait-bounds-trait-objects.rs
parent4a45ab5ad4d6955285f79f331e677ecb5cdb60f1 (diff)
parentad20b064c30bbe9626e8c99f2b455cc6fd836d18 (diff)
downloadrust-62e3a05291ef782cf212675d9e13c0b937c788c8.tar.gz
rust-62e3a05291ef782cf212675d9e13c0b937c788c8.zip
Merge pull request #2512 from rust-lang/rustc-pull
Rustc pull update
Diffstat (limited to 'tests/ui/traits/const-traits/const-trait-bounds-trait-objects.rs')
-rw-r--r--tests/ui/traits/const-traits/const-trait-bounds-trait-objects.rs8
1 files changed, 3 insertions, 5 deletions
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