2023-12-18 17:55:55 +01:00
|
|
|
// Regression test for issue #117244.
|
2024-10-30 18:03:44 +00:00
|
|
|
#![feature(const_trait_impl)]
|
2023-12-18 17:55:55 +01:00
|
|
|
|
|
|
|
|
trait NonConst {}
|
|
|
|
|
|
2025-03-11 12:08:45 +00:00
|
|
|
const fn perform<T: [const] NonConst>() {}
|
2025-07-13 16:49:19 +08:00
|
|
|
//~^ ERROR `[const]` can only be applied to `const` traits
|
|
|
|
|
//~| ERROR `[const]` can only be applied to `const` traits
|
2023-12-18 17:55:55 +01:00
|
|
|
|
|
|
|
|
fn operate<T: const NonConst>() {}
|
2025-07-13 16:49:19 +08:00
|
|
|
//~^ ERROR `const` can only be applied to `const` traits
|
2023-12-18 17:55:55 +01:00
|
|
|
|
|
|
|
|
fn main() {}
|