|
1 |
| -error[E0308]: method not compatible with trait |
2 |
| - --> $DIR/issue-83765.rs:49:5 |
| 1 | +error[E0391]: cycle detected when resolving instance `<LazyUpdim<'_, T, <T as TensorDimension>::DIM, DIM> as TensorDimension>::DIM` |
| 2 | + --> $DIR/issue-83765.rs:5:5 |
3 | 3 | |
|
4 |
| -LL | fn size(&self) -> [usize; DIM] { |
5 |
| - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Self::DIM`, found `DIM` |
| 4 | +LL | const DIM: usize; |
| 5 | + | ^^^^^^^^^^^^^^^^ |
6 | 6 | |
|
7 |
| - = note: expected constant `Self::DIM` |
8 |
| - found constant `DIM` |
9 |
| - |
10 |
| -error[E0308]: method not compatible with trait |
11 |
| - --> $DIR/issue-83765.rs:57:5 |
12 |
| - | |
13 |
| -LL | fn bget(&self, index: [usize; DIM]) -> Option<Self::Element> { |
14 |
| - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Self::DIM`, found `DIM` |
15 |
| - | |
16 |
| - = note: expected constant `Self::DIM` |
17 |
| - found constant `DIM` |
18 |
| - |
19 |
| -error[E0308]: method not compatible with trait |
20 |
| - --> $DIR/issue-83765.rs:86:5 |
21 |
| - | |
22 |
| -LL | fn size(&self) -> [usize; DIM] { |
23 |
| - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Self::DIM`, found `DIM` |
24 |
| - | |
25 |
| - = note: expected constant `Self::DIM` |
26 |
| - found constant `DIM` |
27 |
| - |
28 |
| -error[E0308]: method not compatible with trait |
29 |
| - --> $DIR/issue-83765.rs:98:5 |
30 |
| - | |
31 |
| -LL | fn bget(&self, index: [usize; DIM]) -> Option<Self::Element> { |
32 |
| - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Self::DIM`, found `DIM` |
33 |
| - | |
34 |
| - = note: expected constant `Self::DIM` |
35 |
| - found constant `DIM` |
36 |
| - |
37 |
| -error: unconstrained generic constant |
38 |
| - --> $DIR/issue-83765.rs:60:18 |
39 |
| - | |
40 |
| -LL | if !self.inbounds(index) { |
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:16:39 |
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:60:27 |
52 |
| - | |
53 |
| -LL | if !self.inbounds(index) { |
54 |
| - | ^^^^^ expected `Self::DIM`, found `DIM` |
55 |
| - | |
56 |
| - = note: expected constant `Self::DIM` |
57 |
| - found constant `DIM` |
58 |
| - |
59 |
| -error: unconstrained generic constant |
60 |
| - --> $DIR/issue-83765.rs:65: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:15:31 |
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:67: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` clause, 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:88:24 |
85 |
| - | |
86 |
| -LL | 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:15:31 |
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:88:9 |
98 |
| - | |
99 |
| -LL | self.reference.size() |
100 |
| - | ^^^^^^^^^^^^^^^^^^^^^ expected `DIM`, found `Self::DIM` |
101 |
| - | |
102 |
| - = note: expected constant `DIM` |
103 |
| - found constant `Self::DIM` |
104 |
| - |
105 |
| -error: unconstrained generic constant |
106 |
| - --> $DIR/issue-83765.rs:100: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:23:35 |
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:100:29 |
| 7 | +note: ...which requires computing candidate for `<LazyUpdim<'_, T, <T as TensorDimension>::DIM, DIM> as TensorDimension>`... |
| 8 | + --> $DIR/issue-83765.rs:4:1 |
120 | 9 | |
|
121 |
| -LL | self.reference.bget(index).map(&self.closure) |
122 |
| - | ^^^^^ expected `Self::DIM`, found `DIM` |
| 10 | +LL | trait TensorDimension { |
| 11 | + | ^^^^^^^^^^^^^^^^^^^^^ |
| 12 | + = note: ...which again requires resolving instance `<LazyUpdim<'_, T, <T as TensorDimension>::DIM, DIM> as TensorDimension>::DIM`, completing the cycle |
| 13 | +note: cycle used when computing candidate for `<LazyUpdim<'_, T, { T::DIM }, DIM> as TensorDimension>` |
| 14 | + --> $DIR/issue-83765.rs:4:1 |
123 | 15 | |
|
124 |
| - = note: expected constant `Self::DIM` |
125 |
| - found constant `DIM` |
| 16 | +LL | trait TensorDimension { |
| 17 | + | ^^^^^^^^^^^^^^^^^^^^^ |
126 | 18 |
|
127 |
| -error: aborting due to 12 previous errors |
| 19 | +error: aborting due to previous error |
128 | 20 |
|
129 |
| -Some errors have detailed explanations: E0277, E0308. |
130 |
| -For more information about an error, try `rustc --explain E0277`. |
| 21 | +For more information about this error, try `rustc --explain E0391`. |
0 commit comments