1 // run-pass
2 
3 trait Foo {
4     const NUM: usize;
5 }
6 
7 impl Foo for i32 {
8     const NUM: usize = 1;
9 }
10 
11 const FOO: usize = <i32 as Foo>::NUM;
12 
main()13 fn main() {
14     assert_eq!(1, FOO);
15 
16     match 1 {
17         <i32 as Foo>::NUM => {},
18         _ => assert!(false)
19     }
20 }
21