diff options
| author | León Orell Valerian Liehr <me@fmease.dev> | 2023-12-18 17:55:55 +0100 |
|---|---|---|
| committer | León Orell Valerian Liehr <me@fmease.dev> | 2023-12-27 12:51:32 +0100 |
| commit | 3eb48a35c8ae8335da66dc2bdb4f60e6ae22e1dd (patch) | |
| tree | eadb378f48629728c106252798e74f8faf1bf745 /tests/ui/rfcs/rfc-2632-const-trait-impl/const-bounds-non-const-trait.rs | |
| parent | 2fe50cd72c476ebacdedb14893e9632b4de961c2 (diff) | |
| download | rust-3eb48a35c8ae8335da66dc2bdb4f60e6ae22e1dd.tar.gz rust-3eb48a35c8ae8335da66dc2bdb4f60e6ae22e1dd.zip | |
Introduce `const Trait` (always-const trait bounds)
Diffstat (limited to 'tests/ui/rfcs/rfc-2632-const-trait-impl/const-bounds-non-const-trait.rs')
| -rw-r--r-- | tests/ui/rfcs/rfc-2632-const-trait-impl/const-bounds-non-const-trait.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-bounds-non-const-trait.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-bounds-non-const-trait.rs new file mode 100644 index 00000000000..3582e5e050c --- /dev/null +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-bounds-non-const-trait.rs @@ -0,0 +1,12 @@ +// Regression test for issue #117244. +#![feature(const_trait_impl, effects)] + +trait NonConst {} + +const fn perform<T: ~const NonConst>() {} +//~^ ERROR `~const` can only be applied to `#[const_trait]` traits + +fn operate<T: const NonConst>() {} +//~^ ERROR `const` can only be applied to `#[const_trait]` traits + +fn main() {} |
