This repository was archived by the owner on May 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 63
Commit a15b1d9
committed
ices/83765.rs: fixed with errors
=== stdout ===
=== stderr ===
warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes
--> /home/runner/work/glacier/glacier/ices/83765.rs:1:12
|
1 | #![feature(generic_const_exprs)]
| ^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default
= note: see issue #76560 <rust-lang/rust#76560> for more information
error[E0308]: method not compatible with trait
--> /home/runner/work/glacier/glacier/ices/83765.rs:51:5
|
51 | fn size(&self) -> [usize; DIM] {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Self::DIM`, found `DIM`
|
= note: expected type `Self::DIM`
found type `DIM`
error[E0308]: method not compatible with trait
--> /home/runner/work/glacier/glacier/ices/83765.rs:57:5
|
57 | fn bget(&self, index: [usize; DIM]) -> Option<Self::Element> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Self::DIM`, found `DIM`
|
= note: expected type `Self::DIM`
found type `DIM`
error[E0308]: method not compatible with trait
--> /home/runner/work/glacier/glacier/ices/83765.rs:81:5
|
81 | fn size(&self) -> [usize; DIM] {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Self::DIM`, found `DIM`
|
= note: expected type `Self::DIM`
found type `DIM`
error[E0308]: method not compatible with trait
--> /home/runner/work/glacier/glacier/ices/83765.rs:89:5
|
89 | fn bget(&self, index: [usize; DIM]) -> Option<Self::Element> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Self::DIM`, found `DIM`
|
= note: expected type `Self::DIM`
found type `DIM`
error: unconstrained generic constant
--> /home/runner/work/glacier/glacier/ices/83765.rs:59:18
|
59 | if !self.inbounds(index) {
| ^^^^^^^^
|
= help: try adding a `where` bound using this expression: `where [(); Self::DIM]:`
note: required by a bound in `TensorSize::inbounds`
--> /home/runner/work/glacier/glacier/ices/83765.rs:13:39
|
13 | fn inbounds(&self, index: [usize; Self::DIM]) -> bool {
| ^^^^^^^^^ required by this bound in `TensorSize::inbounds`
error[E0308]: mismatched types
--> /home/runner/work/glacier/glacier/ices/83765.rs:59:27
|
59 | if !self.inbounds(index) {
| ^^^^^ expected `Self::DIM`, found `DIM`
|
= note: expected type `Self::DIM`
found type `DIM`
error: unconstrained generic constant
--> /home/runner/work/glacier/glacier/ices/83765.rs:62:25
|
62 | let size = self.size();
| ^^^^
|
= help: try adding a `where` bound using this expression: `where [(); Self::DIM]:`
note: required by a bound in `TensorSize::size`
--> /home/runner/work/glacier/glacier/ices/83765.rs:12:31
|
12 | fn size(&self) -> [usize; Self::DIM];
| ^^^^^^^^^ required by this bound in `TensorSize::size`
error[E0277]: the trait bound `[usize; _]: Default` is not satisfied
--> /home/runner/work/glacier/glacier/ices/83765.rs:63:41
|
63 | let newindex: [usize; T::DIM] = Default::default(); //array_init::array_init(|i| if size[i] > 1 {index[i]} else {0});
| ^^^^^^^^^^^^^^^^ 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
|
55 | impl<'a, T: Broadcastable, const DIM: usize> Broadcastable for LazyUpdim<'a, T, { T::DIM }, DIM> where [usize; _]: Default {
| +++++++++++++++++++++++++
error: unconstrained generic constant
--> /home/runner/work/glacier/glacier/ices/83765.rs:82:24
|
82 | self.reference.size()
| ^^^^
|
= help: try adding a `where` bound using this expression: `where [(); Self::DIM]:`
note: required by a bound in `TensorSize::size`
--> /home/runner/work/glacier/glacier/ices/83765.rs:12:31
|
12 | fn size(&self) -> [usize; Self::DIM];
| ^^^^^^^^^ required by this bound in `TensorSize::size`
error[E0308]: mismatched types
--> /home/runner/work/glacier/glacier/ices/83765.rs:82:9
|
82 | self.reference.size()
| ^^^^^^^^^^^^^^^^^^^^^ expected `DIM`, found `Self::DIM`
|
= note: expected type `DIM`
found type `Self::DIM`
error: unconstrained generic constant
--> /home/runner/work/glacier/glacier/ices/83765.rs:90:24
|
90 | 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`
--> /home/runner/work/glacier/glacier/ices/83765.rs:20:35
|
20 | fn bget(&self, index: [usize; Self::DIM]) -> Option<Self::Element>;
| ^^^^^^^^^ required by this bound in `Broadcastable::bget`
error[E0308]: mismatched types
--> /home/runner/work/glacier/glacier/ices/83765.rs:90:29
|
90 | 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; 1 warning emitted
Some errors have detailed explanations: E0277, E0308.
For more information about an error, try `rustc --explain E0277`.
==============1 parent bbf9276 commit a15b1d9Copy full SHA for a15b1d9
1 file changed
+0
-0
lines changedices/83765.rs renamed to fixed/83765.rs
Copy file name to clipboardFile renamed without changes.
0 commit comments