error[E0308]: method not compatible with trait --> $DIR/issue-83765.rs:44:5 | LL | fn size(&self) -> [usize;DIM] {self.size} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Self::DIM`, found `DIM` | = note: expected type `Self::DIM` found type `DIM` error[E0308]: method not compatible with trait --> $DIR/issue-83765.rs:51:5 | LL | fn bget(&self,index:[usize;DIM]) -> Option { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Self::DIM`, found `DIM` | = note: expected type `Self::DIM` found type `DIM` error[E0308]: method not compatible with trait --> $DIR/issue-83765.rs:78:5 | LL | fn size(&self) -> [usize;DIM] {self.reference.size()} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Self::DIM`, found `DIM` | = note: expected type `Self::DIM` found type `DIM` error[E0308]: method not compatible with trait --> $DIR/issue-83765.rs:88:5 | LL | fn bget(&self,index:[usize;DIM]) -> Option { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Self::DIM`, found `DIM` | = note: expected type `Self::DIM` found type `DIM` error: unconstrained generic constant --> $DIR/issue-83765.rs:54:18 | LL | if !self.inbounds(index) {return None} | ^^^^^^^^ | = help: try adding a `where` bound using this expression: `where [(); Self::DIM]:` note: required by a bound in `TensorSize::inbounds` --> $DIR/issue-83765.rs:12:38 | LL | fn inbounds(&self,index : [usize;Self::DIM]) -> bool { | ^^^^^^^^^ required by this bound in `TensorSize::inbounds` error[E0308]: mismatched types --> $DIR/issue-83765.rs:54:27 | LL | if !self.inbounds(index) {return None} | ^^^^^ expected `Self::DIM`, found `DIM` | = note: expected type `Self::DIM` found type `DIM` error: unconstrained generic constant --> $DIR/issue-83765.rs:57:25 | LL | let size = self.size(); | ^^^^ | = help: try adding a `where` bound using this expression: `where [(); Self::DIM]:` note: required by a bound in `TensorSize::size` --> $DIR/issue-83765.rs:11:30 | LL | fn size(&self) -> [usize;Self::DIM]; | ^^^^^^^^^ required by this bound in `TensorSize::size` error[E0277]: the trait bound `[usize; _]: Default` is not satisfied --> $DIR/issue-83765.rs:59:41 | LL | let newindex : [usize;T::DIM] = Default::default(); | ^^^^^^^^^^^^^^^^ the trait `Default` is not implemented for `[usize; _]` | help: consider introducing a `where` bound, but there might be an alternative better way to express this requirement | LL | impl<'a,T : Broadcastable,const DIM : usize> Broadcastable for LazyUpdim<'a,T,{T::DIM},DIM> where [usize; _]: Default | +++++++++++++++++++++++++ error: unconstrained generic constant --> $DIR/issue-83765.rs:78:51 | LL | fn size(&self) -> [usize;DIM] {self.reference.size()} | ^^^^ | = help: try adding a `where` bound using this expression: `where [(); Self::DIM]:` note: required by a bound in `TensorSize::size` --> $DIR/issue-83765.rs:11:30 | LL | fn size(&self) -> [usize;Self::DIM]; | ^^^^^^^^^ required by this bound in `TensorSize::size` error[E0308]: mismatched types --> $DIR/issue-83765.rs:78:36 | LL | fn size(&self) -> [usize;DIM] {self.reference.size()} | ^^^^^^^^^^^^^^^^^^^^^ expected `DIM`, found `Self::DIM` | = note: expected type `DIM` found type `Self::DIM` error: unconstrained generic constant --> $DIR/issue-83765.rs:90:24 | LL | self.reference.bget(index).map(&self.closure) | ^^^^ | = help: try adding a `where` bound using this expression: `where [(); Self::DIM]:` note: required by a bound in `Broadcastable::bget` --> $DIR/issue-83765.rs:20:33 | LL | fn bget(&self, index:[usize;Self::DIM]) -> Option; | ^^^^^^^^^ required by this bound in `Broadcastable::bget` error[E0308]: mismatched types --> $DIR/issue-83765.rs:90:29 | LL | self.reference.bget(index).map(&self.closure) | ^^^^^ expected `Self::DIM`, found `DIM` | = note: expected type `Self::DIM` found type `DIM` error: aborting due to 12 previous errors Some errors have detailed explanations: E0277, E0308. For more information about an error, try `rustc --explain E0277`.