Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sizedness of const parameter types #112219

Closed
BoxyUwU opened this issue Jun 2, 2023 · 0 comments · Fixed by #127722
Closed

sizedness of const parameter types #112219

BoxyUwU opened this issue Jun 2, 2023 · 0 comments · Fixed by #127722
Assignees
Labels
A-const-generics Area: const generics (parameters and arguments) F-adt_const_params `#![feature(adt_const_params)]` T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-types Relevant to the types team, which will review and decide on the PR/issue.

Comments

@BoxyUwU
Copy link
Member

BoxyUwU commented Jun 2, 2023

currently there is no restriction on const parameter types having to be sized, although it is impossible to provide any arguments to a parameter such as const N: [u8] because type checking { [1; 2] as [u8] } will fail as [u8] is not Sized. We should figure out if we want to find some way to allow !Sized const generics to work or if we want to explicitly forbid them (although if we do we should not add Sized as a supertrait of ConstParamTy as that would make it impossible to ever allow !Sized const parameter types)

@BoxyUwU BoxyUwU added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. A-const-generics Area: const generics (parameters and arguments) F-adt_const_params `#![feature(adt_const_params)]` T-types Relevant to the types team, which will review and decide on the PR/issue. labels Jun 2, 2023
@BoxyUwU BoxyUwU self-assigned this Jul 14, 2024
@bors bors closed this as completed in 9629b90 Jul 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-const-generics Area: const generics (parameters and arguments) F-adt_const_params `#![feature(adt_const_params)]` T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-types Relevant to the types team, which will review and decide on the PR/issue.
Projects
None yet
1 participant