rust/tests/ui/rfcs/rfc-2632-const-trait-impl/const-bounds-non-const-trait.rs
2023-12-27 12:51:32 +01:00

13 lines
322 B
Rust

// 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() {}