diff options
| author | Tshepang Mbambo <hopsi@tuta.io> | 2025-07-21 11:16:20 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-21 11:16:20 +0200 |
| commit | 62e3a05291ef782cf212675d9e13c0b937c788c8 (patch) | |
| tree | 57ddd8cbcb5f32bd2773165cc53b9c69d65ed720 /tests/ui/traits/const-traits/const-trait-bounds-trait-objects.rs | |
| parent | 4a45ab5ad4d6955285f79f331e677ecb5cdb60f1 (diff) | |
| parent | ad20b064c30bbe9626e8c99f2b455cc6fd836d18 (diff) | |
| download | rust-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.rs | 8 |
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 |
