]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-69602-type-err-during-codegen-ice.rs
Consider privacy more carefully when suggesting accessing fields
[rust.git] / src / test / ui / issues / issue-69602-type-err-during-codegen-ice.rs
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];
22     //~^ ERROR evaluation of constant value failed
23 }