mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-03 02:40:40 +00:00
14 lines
356 B
Rust
14 lines
356 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` traits
|
|
//~| ERROR `[const]` can only be applied to `const` traits
|
|
|
|
fn operate<T: const NonConst>() {}
|
|
//~^ ERROR `const` can only be applied to `const` traits
|
|
|
|
fn main() {}
|