5 [0; std::mem::size_of::<*mut T>()];
6 //~^ WARN cannot use constants which depend on generic parameters in types
7 //~| WARN this was previously accepted by the compiler but is being phased out
13 const ASSOC: usize = 4;
16 let _ = [0; Self::ASSOC];
17 //~^ WARN cannot use constants which depend on generic parameters in types
18 //~| WARN this was previously accepted by the compiler but is being phased out
22 struct Bar<const N: usize>;
24 impl<const N: usize> Bar<N> {
25 const ASSOC: usize = 4;
28 let _ = [0; Self::ASSOC];
29 //~^ WARN cannot use constants which depend on generic parameters in types
30 //~| WARN this was previously accepted by the compiler but is being phased out