rust/tests/ui/rfcs/rfc-2632-const-trait-impl/const-bounds-non-const-trai...

13 lines
367 B
Rust

// Regression test for issue #117244.
#![feature(const_trait_impl, effects)] //~ WARN the feature `effects` is incomplete
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() {}