rust/tests/ui/traits/const-traits/const-bounds-non-const-trait.rs
2024-11-03 18:59:31 +00:00

14 lines
380 B
Rust

// Regression test for issue #117244.
#![feature(const_trait_impl)]
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
fn operate<T: const NonConst>() {}
//~^ ERROR `const` can only be applied to `#[const_trait]` traits
fn main() {}