2023-12-18 16:55:55 +00:00
|
|
|
// Regression test for issue #117244.
|
2024-06-21 12:22:29 +00:00
|
|
|
#![feature(const_trait_impl, effects)] //~ WARN the feature `effects` is incomplete
|
2023-12-18 16:55:55 +00:00
|
|
|
|
|
|
|
trait NonConst {}
|
|
|
|
|
|
|
|
const fn perform<T: ~const NonConst>() {}
|
|
|
|
//~^ ERROR `~const` can only be applied to `#[const_trait]` traits
|
2024-10-20 19:49:11 +00:00
|
|
|
//~| ERROR `~const` can only be applied to `#[const_trait]` traits
|
2023-12-18 16:55:55 +00:00
|
|
|
|
|
|
|
fn operate<T: const NonConst>() {}
|
|
|
|
//~^ ERROR `const` can only be applied to `#[const_trait]` traits
|
|
|
|
|
|
|
|
fn main() {}
|