1 // Checks that pointers must not be used as the type of const params.
4 #![cfg_attr(full, feature(const_generics))]
5 #![cfg_attr(full, allow(incomplete_features))]
6 #![cfg_attr(min, feature(min_const_generics))]
10 struct Const<const P: *const u32>; //~ ERROR: using raw pointers as const generic parameters
12 impl<const P: *const u32> Const<P> { //~ ERROR: using raw pointers as const generic parameters
21 assert_eq!(Const::<{&A as *const _}>::get(), 3)