-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
reordering type parameters causes const generics ICE #69970
Comments
It doesn't require feature flag. |
I am currently working on this |
@varkor, my first idea was to fix this ICE locally by offsetting rust/src/librustc_typeck/collect.rs Lines 1291 to 1318 in 7cdbc87
This only moves the error further back. Lines 544 to 562 in 7cdbc87
I currently think that it would be best to actually fix the param order if rust/src/librustc_ast_passes/ast_validation.rs Lines 648 to 653 in 7cdbc87
Is this a good approach? And how should this be done, as |
I think the right fix for this would be to make sure we can handle generic parameters in any order — there's no technical reason the parameters should be in a fixed order; it's just historical. This would involve doing what you started with, and fixing each problem in turn. However, I don't know how many things still rely on this order, so it could be an involved task. For a shorter-term fix, we could just make sure that generics are sorted if they're in the wrong order. We could probably do this in Thanks for looking into this @lcnr! |
Code
Meta
rustc +nightly --version --verbose
:Error output
Backtrace
The text was updated successfully, but these errors were encountered: