Files
rust/tests
Jacob Pratt 2aa5ef1c5f Rollup merge of #153615 - enthropy7:fix-ice-generics-of-crate-node, r=fee1-dead
fixed generics of crate node ICE

when `note_and_explain_type_err` is called during dyn-compatibility checking, the `body_owner_def_id` can be `CRATE_DEF_ID` because `ObligationCause::dummy()` uses it as a placeholder when there is no real body owner. calling `generics_of `on `CRATE_DEF_ID `caused an ICE because the crate root is a module and modules don't have generics. the fix guards all `generics_of` call sites by checking whether `body_owner_def_id` is `CRATE_DEF_ID` before attempting to look up generics, and skips the type parameter span labeling in that case.

i also added regression test with original ice reproduce

fixes rust-lang/rust#152335
2026-04-05 20:51:06 -04:00
..
2026-04-02 09:44:38 -05:00
2026-04-03 11:08:11 +02:00