-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-const-genericsArea: const generics (parameters and arguments)Area: const generics (parameters and arguments)A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsF-generic_const_exprs`#![feature(generic_const_exprs)]``#![feature(generic_const_exprs)]`P-lowLow priorityLow priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way.This issue requires a nightly compiler in some way.
Description
Example below. Based on the description in #76560, I'd expect to not be required to add [(); From::DIM]:
and [(); To::DIM]
bounds to Transform
because the associated consts are inherent to the trait's definition and thus are public APIs.
#![feature(generic_const_exprs)]
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],
}
linclelinkpart5, agausmann, gkanwar and tgross35
Metadata
Metadata
Assignees
Labels
A-const-genericsArea: const generics (parameters and arguments)Area: const generics (parameters and arguments)A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsF-generic_const_exprs`#![feature(generic_const_exprs)]``#![feature(generic_const_exprs)]`P-lowLow priorityLow priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way.This issue requires a nightly compiler in some way.