13 impl<T: C> Foo<T> for A<T> {
14 const BAR: usize = [5, 6, 7][T::BOO]; //~ ERROR any use of this value will cause an error
15 //~| WARN this was previously accepted by the compiler but is being phased out
18 fn foo<T: C>() -> &'static usize {
19 &<A<T> as Foo<T>>::BAR //~ ERROR E0080
23 const BOO: usize = 42;
31 println!("{:x}", foo::<()>() as *const usize as usize);
32 println!("{:x}", foo::<u32>() as *const usize as usize);
33 println!("{:x}", foo::<()>());
34 println!("{:x}", foo::<u32>());