1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
trait Foo { const ID: i32; } trait Bar { const ID: i32; } impl Foo for i32 { const ID: i32 = 1; } impl Bar for i32 { const ID: i32 = 3; } const X: i32 = <i32>::ID; //~ ERROR E0034 fn main() { assert_eq!(1, X); }