Closed
Description
Filing in addition to #80976 because this seems to be a separate issue. Includes the same example below. Essentially, even though the associated constant To::DIM
is being used in the definition of the struct, the compiler marks To
as being unused since no types related to it are being used.
#![feature(const_generics, const_evaluatable_checked)]
trait Vector {
type Scalar;
const DIM: usize;
}
struct Transform<From, To>
where
From: Vector,
To: Vector<Scalar = From::Scalar>,
{
columns: [[From::Scalar; From::DIM]; To::DIM],
}