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))]
9 struct Const<const P: *const u32>; //~ ERROR: using raw pointers as const generic parameters
11 impl<const P: *const u32> Const<P> { //~ ERROR: using raw pointers as const generic parameters
20 assert_eq!(Const::<{&A as *const _}>::get(), 3)