mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 23:12:02 +00:00
6 lines
219 B
Rust
6 lines
219 B
Rust
struct Checked<const F: fn(usize) -> bool>;
|
|
//~^ ERROR function pointers as const generic parameters is forbidden
|
|
fn not_one(val: usize) -> bool { val != 1 }
|
|
const _: Checked<not_one> = Checked::<not_one>;
|
|
fn main() {}
|