You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to resolve some of the problems we encountered in integrating const generics, we want to do the following refactorings:
replaces type Parameter = ParameterKind<...> with a GenericArg (copying Rust's name) -- for bonus points, it should be an interned struct as well with a data method that gets a GenericArgData
and refactors ParameterKind<()> into BoundVariableKind<I> or something like (which for now is just type/lifetime and I guess a phantomdata for the I parameter)
and refactors ParameterKind<EnaVariable> into a (BoundVariableKind, EnaVariable) pair
Then we can, in the const generics PR:
extend BoundVariableKind with Const(Ty<I>)
extend GenericArg with a Const(Const<I>) variable, and Const<I> can carry the Ty<I> (as rustc handles it)
The text was updated successfully, but these errors were encountered:
In order to resolve some of the problems we encountered in integrating const generics, we want to do the following refactorings:
type Parameter = ParameterKind<...>
with aGenericArg
(copying Rust's name) -- for bonus points, it should be an interned struct as well with adata
method that gets aGenericArgData
ParameterKind<()>
intoBoundVariableKind<I>
or something like (which for now is just type/lifetime and I guess a phantomdata for theI
parameter)ParameterKind<EnaVariable>
into a(BoundVariableKind, EnaVariable)
pairThen we can, in the const generics PR:
BoundVariableKind
withConst(Ty<I>)
GenericArg
with aConst(Const<I>)
variable, andConst<I>
can carry theTy<I>
(as rustc handles it)The text was updated successfully, but these errors were encountered: