blob: 90c438b05cb816459e5e4a1b9190e11559ea0a1c [file] [log] [blame]
#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete
fn function() -> u32 {
17
}
struct Wrapper<const F: fn() -> u32>; //~ ERROR: using function pointers as const generic parameters
impl<const F: fn() -> u32> Wrapper<F> {
//~^ ERROR: using function pointers as const generic parameters
fn call() -> u32 {
F()
}
}
fn main() {
assert_eq!(Wrapper::<function>::call(), 17);
}