rust/tests/ui/const-generics/ice-118285-fn-ptr-value.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

6 lines
219 B
Rust
Raw Normal View History

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() {}