-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
fix ICE const parameters cannot be generic
in generic_const_exprs
#108172
Conversation
The core issue here is that we do not support const arguments to const parameters that are generic (as the ICE states), the test case is a bit obfuscated since its not clear that An equivalent test case: pub trait TraitWAssocConst<T> {
const A: T;
}
fn main<T, B: TraitWAssocConst<T, A = { 1 }>>() {} ICEd before #107753 landed (on current stable it ICEs with "const parameters cannot be generic"): Backtrace
The long term fix here is for us to actually support generic const parameter types (although this is a little ways off and cannot be done right now), short term the logic for Closing this since we do want this |
Ah okay, that makes sense. Thanks so much for explaining! |
Fixes #108165.
In #107753, we changed several uses of
tcx.type_of(did)
on consts totcx.type_of(did).no_bound_vars().expect(..)
after addingEarlyBinder
, one of which is causing this ICE.r? @BoxyUwU