-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Array lengths don't support generic parameters. #43408
Copy link
Copy link
Open
Labels
A-arrayArea: `[T; N]`Area: `[T; N]`A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)Area: Constant evaluation, covers all const contexts (static, const fn, ...)A-const-genericsArea: const generics (parameters and arguments)Area: const generics (parameters and arguments)A-lazy-normalizationArea: Lazy normalization (tracking issue: #60471)Area: Lazy normalization (tracking issue: #60471)T-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.glacierICE tracked in rust-lang/glacier.ICE tracked in rust-lang/glacier.
Metadata
Metadata
Assignees
Labels
A-arrayArea: `[T; N]`Area: `[T; N]`A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)Area: Constant evaluation, covers all const contexts (static, const fn, ...)A-const-genericsArea: const generics (parameters and arguments)Area: const generics (parameters and arguments)A-lazy-normalizationArea: Lazy normalization (tracking issue: #60471)Area: Lazy normalization (tracking issue: #60471)T-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.glacierICE tracked in rust-lang/glacier.ICE tracked in rust-lang/glacier.
Type
Fields
Give feedbackNo fields configured for issues without a type.
EDIT: This can now be made to work on nightly compilers, although it's a bit awkward to use. See this comment.
It would seem that when using size_of in const fn context, it fails to properly compute the size of generic types.
The following function fails
The error is the following :
This is very confusing because it complains that
Tdoesn't havestd::marker::Sized, even though it does have that bound.Meta
rustc_version : rustc 1.20.0-nightly (ae98ebf 2017-07-20)