-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Validate HIR ty lowering's produced generic parameters #150620
Copy link
Copy link
Open
Labels
A-HIR-ty-loweringArea: HIR ty lowering (HIR → middle::ty IR)Area: HIR ty lowering (HIR → middle::ty IR)A-technical-debtArea: Internal cleanup workArea: Internal cleanup workC-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.E-needs-designThis issue needs exploration and design to see how and if we can fix/implement itThis issue needs exploration and design to see how and if we can fix/implement itF-min_generic_const_args`#![feature(min_generic_const_args)]``#![feature(min_generic_const_args)]`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.
Metadata
Metadata
Labels
A-HIR-ty-loweringArea: HIR ty lowering (HIR → middle::ty IR)Area: HIR ty lowering (HIR → middle::ty IR)A-technical-debtArea: Internal cleanup workArea: Internal cleanup workC-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.E-needs-designThis issue needs exploration and design to see how and if we can fix/implement itThis issue needs exploration and design to see how and if we can fix/implement itF-min_generic_const_args`#![feature(min_generic_const_args)]``#![feature(min_generic_const_args)]`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.
Type
Fields
Give feedbackNo fields configured for issues without a type.
In #150519 we added some checks to HIR ty lowering that when lowering to a generic parameter, we aren't inside of an anon const for const generics which shouldn't be able to use generic parameters.
There are a two main bits of follow up work here:
generics_ofof the item we're inside of and asserted they are actually supposed to be nameableI expect things to be quite perf sensitive here, and also it seems hard to get a good API here. cc @camelid
I've tagged this as
F-min_generic_const_argsas we rely quite heavily on this check for mGCA as we don't do any validation at name resolution time. But this logic is used on stable and it would be good to have these assertions on stable too