|
1 |
| -error[E0308]: method not compatible with trait |
2 |
| - --> $DIR/issue-83765.rs:44:5 |
| 1 | +error[E0391]: cycle detected when resolving instance `<LazyUpdim<T, {T::DIM}, DIM> as TensorDimension>::DIM` |
| 2 | + --> $DIR/issue-83765.rs:5:5 |
3 | 3 | |
|
4 |
| -LL | fn size(&self) -> [usize;DIM] {self.size} |
5 |
| - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Self::DIM`, found `DIM` |
| 4 | +LL | const DIM : usize; |
| 5 | + | ^^^^^^^^^^^^^^^^^^ |
6 | 6 | |
|
7 |
| - = note: expected type `Self::DIM` |
8 |
| - found type `DIM` |
9 |
| - |
10 |
| -error[E0308]: method not compatible with trait |
11 |
| - --> $DIR/issue-83765.rs:51:5 |
12 |
| - | |
13 |
| -LL | fn bget(&self,index:[usize;DIM]) -> Option<Self::Element> { |
14 |
| - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Self::DIM`, found `DIM` |
15 |
| - | |
16 |
| - = note: expected type `Self::DIM` |
17 |
| - found type `DIM` |
18 |
| - |
19 |
| -error[E0308]: method not compatible with trait |
20 |
| - --> $DIR/issue-83765.rs:78:5 |
21 |
| - | |
22 |
| -LL | fn size(&self) -> [usize;DIM] {self.reference.size()} |
23 |
| - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Self::DIM`, found `DIM` |
24 |
| - | |
25 |
| - = note: expected type `Self::DIM` |
26 |
| - found type `DIM` |
27 |
| - |
28 |
| -error[E0308]: method not compatible with trait |
29 |
| - --> $DIR/issue-83765.rs:88:5 |
30 |
| - | |
31 |
| -LL | fn bget(&self,index:[usize;DIM]) -> Option<Self::Element> { |
32 |
| - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Self::DIM`, found `DIM` |
33 |
| - | |
34 |
| - = note: expected type `Self::DIM` |
35 |
| - found type `DIM` |
36 |
| - |
37 |
| -error: unconstrained generic constant |
38 |
| - --> $DIR/issue-83765.rs:54:18 |
39 |
| - | |
40 |
| -LL | if !self.inbounds(index) {return None} |
41 |
| - | ^^^^^^^^ |
42 |
| - | |
43 |
| - = help: try adding a `where` bound using this expression: `where [(); Self::DIM]:` |
44 |
| -note: required by a bound in `TensorSize::inbounds` |
45 |
| - --> $DIR/issue-83765.rs:12:38 |
46 |
| - | |
47 |
| -LL | fn inbounds(&self,index : [usize;Self::DIM]) -> bool { |
48 |
| - | ^^^^^^^^^ required by this bound in `TensorSize::inbounds` |
49 |
| - |
50 |
| -error[E0308]: mismatched types |
51 |
| - --> $DIR/issue-83765.rs:54:27 |
52 |
| - | |
53 |
| -LL | if !self.inbounds(index) {return None} |
54 |
| - | ^^^^^ expected `Self::DIM`, found `DIM` |
55 |
| - | |
56 |
| - = note: expected type `Self::DIM` |
57 |
| - found type `DIM` |
58 |
| - |
59 |
| -error: unconstrained generic constant |
60 |
| - --> $DIR/issue-83765.rs:57:25 |
61 |
| - | |
62 |
| -LL | let size = self.size(); |
63 |
| - | ^^^^ |
64 |
| - | |
65 |
| - = help: try adding a `where` bound using this expression: `where [(); Self::DIM]:` |
66 |
| -note: required by a bound in `TensorSize::size` |
67 |
| - --> $DIR/issue-83765.rs:11:30 |
68 |
| - | |
69 |
| -LL | fn size(&self) -> [usize;Self::DIM]; |
70 |
| - | ^^^^^^^^^ required by this bound in `TensorSize::size` |
71 |
| - |
72 |
| -error[E0277]: the trait bound `[usize; _]: Default` is not satisfied |
73 |
| - --> $DIR/issue-83765.rs:59:41 |
74 |
| - | |
75 |
| -LL | let newindex : [usize;T::DIM] = Default::default(); |
76 |
| - | ^^^^^^^^^^^^^^^^ the trait `Default` is not implemented for `[usize; _]` |
77 |
| - | |
78 |
| -help: consider introducing a `where` bound, but there might be an alternative better way to express this requirement |
79 |
| - | |
80 |
| -LL | impl<'a,T : Broadcastable,const DIM : usize> Broadcastable for LazyUpdim<'a,T,{T::DIM},DIM> where [usize; _]: Default |
81 |
| - | +++++++++++++++++++++++++ |
82 |
| - |
83 |
| -error: unconstrained generic constant |
84 |
| - --> $DIR/issue-83765.rs:78:51 |
85 |
| - | |
86 |
| -LL | fn size(&self) -> [usize;DIM] {self.reference.size()} |
87 |
| - | ^^^^ |
88 |
| - | |
89 |
| - = help: try adding a `where` bound using this expression: `where [(); Self::DIM]:` |
90 |
| -note: required by a bound in `TensorSize::size` |
91 |
| - --> $DIR/issue-83765.rs:11:30 |
92 |
| - | |
93 |
| -LL | fn size(&self) -> [usize;Self::DIM]; |
94 |
| - | ^^^^^^^^^ required by this bound in `TensorSize::size` |
95 |
| - |
96 |
| -error[E0308]: mismatched types |
97 |
| - --> $DIR/issue-83765.rs:78:36 |
98 |
| - | |
99 |
| -LL | fn size(&self) -> [usize;DIM] {self.reference.size()} |
100 |
| - | ^^^^^^^^^^^^^^^^^^^^^ expected `DIM`, found `Self::DIM` |
101 |
| - | |
102 |
| - = note: expected type `DIM` |
103 |
| - found type `Self::DIM` |
104 |
| - |
105 |
| -error: unconstrained generic constant |
106 |
| - --> $DIR/issue-83765.rs:90:24 |
107 |
| - | |
108 |
| -LL | self.reference.bget(index).map(&self.closure) |
109 |
| - | ^^^^ |
110 |
| - | |
111 |
| - = help: try adding a `where` bound using this expression: `where [(); Self::DIM]:` |
112 |
| -note: required by a bound in `Broadcastable::bget` |
113 |
| - --> $DIR/issue-83765.rs:20:33 |
114 |
| - | |
115 |
| -LL | fn bget(&self, index:[usize;Self::DIM]) -> Option<Self::Element>; |
116 |
| - | ^^^^^^^^^ required by this bound in `Broadcastable::bget` |
117 |
| - |
118 |
| -error[E0308]: mismatched types |
119 |
| - --> $DIR/issue-83765.rs:90:29 |
120 |
| - | |
121 |
| -LL | self.reference.bget(index).map(&self.closure) |
122 |
| - | ^^^^^ expected `Self::DIM`, found `DIM` |
| 7 | +note: ...which requires checking if `TensorDimension` fulfills its obligations... |
| 8 | + --> $DIR/issue-83765.rs:4:1 |
123 | 9 | |
|
124 |
| - = note: expected type `Self::DIM` |
125 |
| - found type `DIM` |
| 10 | +LL | trait TensorDimension { |
| 11 | + | ^^^^^^^^^^^^^^^^^^^^^ |
| 12 | + = note: ...which again requires resolving instance `<LazyUpdim<T, {T::DIM}, DIM> as TensorDimension>::DIM`, completing the cycle |
| 13 | + = note: cycle used when normalizing `<LazyUpdim<T, {T::DIM}, DIM> as TensorDimension>::DIM` |
126 | 14 |
|
127 |
| -error: aborting due to 12 previous errors |
| 15 | +error: aborting due to previous error |
128 | 16 |
|
129 |
| -Some errors have detailed explanations: E0277, E0308. |
130 |
| -For more information about an error, try `rustc --explain E0277`. |
| 17 | +For more information about this error, try `rustc --explain E0391`. |
0 commit comments