Skip to content

nits for const generics docs #2687

@BoxyUwU

Description

@BoxyUwU
The one exception to all of the above is repeat counts of array expressions. As a *backwards compatibility hack* we allow the repeat count const argument to use generic parameters. ```rust fn foo<T: Sized>() { let a = [1_u8; size_of::<*mut T>()]; } ``` 

example is surprising when reading this, also, maybe use a sub-header here

Originally posted by @lcnr in #2677 (comment)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions