-
Notifications
You must be signed in to change notification settings - Fork 14k
Open
Labels
A-const-genericsArea: const generics (parameters and arguments)Area: const generics (parameters and arguments)C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.This issue may need triage. Remove it if it has been sufficiently triaged.
Description
Currently even with custom ADT const generics, fn() types are not allowed as const generic parameters types.
Adding that support would quite useful as it would allow to specify a ZST type that implements the Fn/FnOnce/FnMut traits by calling a const fn() value from a conat generic parameter (typically from an fb item), guaranteeing monomorphization.
Currently it seems the only way to do this is to manually create with a macro a separate type for each fn item.
Metadata
Metadata
Assignees
Labels
A-const-genericsArea: const generics (parameters and arguments)Area: const generics (parameters and arguments)C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.This issue may need triage. Remove it if it has been sufficiently triaged.