1 // Check that functions cannot be used as const parameters.
4 #![cfg_attr(full, feature(adt_const_params))]
5 #![cfg_attr(full, allow(incomplete_features))]
11 struct Wrapper<const F: fn() -> u32>; //~ ERROR: using function pointers as const generic parameters
13 impl<const F: fn() -> u32> Wrapper<F> {
14 //~^ ERROR: using function pointers as const generic parameters
21 assert_eq!(Wrapper::<function>::call(), 17);