Uh oh!
There was an error while loading. Please reload this page.
Fix ICE in normalizing inherent associated consts with #[type_const] - #152000
Conversation
rustbot
commented
Feb 2, 2026
r? @nnethercote rustbot has assigned @nnethercote. Use |
This comment has been minimized.
This comment has been minimized.
Uh oh!
There was an error while loading. Please reload this page.
rustbot
commented
Feb 2, 2026
Reminder, once the PR becomes ready for a review, use |
nnethercote
commented
Feb 3, 2026
r? @fmease |
rustbot
commented
Feb 3, 2026
|
BoxyUwU
commented
Feb 4, 2026
If you're interested in fixing this I would recommend reading through #project-const-generics > Inherent associated consts (`IAC`) under `MGCA` as I talk there about what a proper fix for our improper handling of inherent associated consts would be |
BoxyUwU
commented
Feb 4, 2026
I expect that we'll need to make |
lapla-cogito
commented
Feb 4, 2026
@BoxyUwU Thank you! I'm interested in resolving this ICE issue series, so I reviewed the thread you provided. I have several questions:
|
BoxyUwU
commented
Feb 4, 2026
oh apparently yes I did implement a lot of that? cool.. In that case I think the two things necessary now are:
In which case doing it all in this PR seems totally reasonable :) |
This comment has been minimized.
This comment has been minimized.
lapla-cogito
commented
Feb 5, 2026
I've implemented the necessary measures to suppress the ICE (though proper handling of crashtest cases that no longer crash remains necessary). However, |
This comment has been minimized.
This comment has been minimized.
lapla-cogito
commented
Feb 5, 2026
Now the remaining concern is how to handle the |
Uh oh!
There was an error while loading. Please reload this page.
This comment has been minimized.
This comment has been minimized.
BoxyUwU
commented
Feb 6, 2026
That test failure isn't your fault. rustdoc is broken right now, see #152194 |
lapla-cogito
commented
Feb 6, 2026
Yes, I saw it just a moment ago :) |
rustbot
commented
Feb 6, 2026
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
BoxyUwU
commented
Feb 6, 2026
@bors r+ rollup thanks :3 |
…uwer Rollup of 6 pull requests Successful merges: - #151590 (cmse: don't use `BackendRepr` when checking return type) - #151945 (feat: Add `NonZero::<T>::from_str_radix`) - #152000 (Fix ICE in normalizing inherent associated consts with `#[type_const]`) - #152192 (Always use Xcode-provided Clang in macOS CI) - #152196 (bootstrap: Remove `ShouldRun::paths`) - #152222 (Re-add TaKO8Ki to triagebot review queue)
Uh oh!
There was an error while loading. Please reload this page.
Rollup merge of #152000 - lapla-cogito:ice_151027, r=BoxyUwU Fix ICE in normalizing inherent associated consts with `#[type_const]` Fixes#151027Fixes#138089Fixes#138226Fixes#150960 When an inherent associated const is marked with `#[type_const]`, its generics expect args in the format `[Self, own_params...]`, similar to inherent associated types. However, HIR typeck's `instantiate_value_path` was constructing args in the regular associated const format `[impl_params..., own_params...]`. This mismatch caused ICEs when the `args` were later used in contexts expecting the IAC format, such as user type annotations and `borrowck`'s type ascription.
Fixes#151027
Fixes#138089
Fixes#138226
Fixes#150960
When an inherent associated const is marked with
#[type_const], its generics expect args in the format[Self, own_params...], similar to inherent associated types. However, HIR typeck'sinstantiate_value_pathwas constructing args in the regular associated const format[impl_params..., own_params...]. This mismatch caused ICEs when theargswere later used in contexts expecting the IAC format, such as user type annotations andborrowck's type ascription.