]>
Commit | Line | Data |
---|---|---|
74b04a01 XL |
1 | trait TraitA { |
2 | const VALUE: usize; | |
3 | } | |
4 | ||
5 | struct A; | |
6 | impl TraitA for A { | |
7 | const VALUE: usize = 0; | |
8 | } | |
9 | ||
10 | trait TraitB { | |
11 | type MyA: TraitA; | |
12 | const VALUE: usize = Self::MyA::VALUE; | |
13 | } | |
14 | ||
15 | struct B; | |
16 | impl TraitB for B { //~ ERROR not all trait items implemented, missing: `MyA` | |
17 | type M = A; //~ ERROR type `M` is not a member of trait `TraitB` | |
18 | } | |
19 | ||
20 | fn main() { | |
21 | let _ = [0; B::VALUE]; | |
ba9703b0 | 22 | //~^ ERROR constant expression depends on a generic parameter |
74b04a01 | 23 | } |