rust/compiler/rustc_hir_analysis
Michael Goulet d1b43d09e3
Rollup merge of #130666 - compiler-errors:super-bounds, r=fee1-dead,fmease
Assert that `explicit_super_predicates_of` and `explicit_item_super_predicates` truly only contains bounds for the type itself

We distinguish _implied_ predicates (anything that is implied from elaborating a trait bound) from _super_ predicates, which are are the subset of implied predicates that share the same self type as the trait predicate we're elaborating. This was originally done in #107614, which fixed a large class of ICEs and strange errors where the compiler expected the self type of a trait predicate not to change when elaborating super predicates.

Specifically, super predicates are special for various reasons: they're the valid candidates for trait upcasting, are the only predicates we elaborate when doing closure signature inference, etc. So making sure that we get this list correct and don't accidentally "leak" any other predicates into this list is quite important.

This PR adds some debug assertions that we're in fact not doing so, and it fixes an oversight in the effect desugaring rework.
2024-09-21 15:18:58 -04:00
..
src Rollup merge of #130666 - compiler-errors:super-bounds, r=fee1-dead,fmease 2024-09-21 15:18:58 -04:00
Cargo.toml bump itertools to 0.12 2024-03-08 12:34:05 +03:00
messages.ftl Rollup merge of #129629 - compiler-errors:rtn-in-path, r=jackh726 2024-09-21 15:18:56 -04:00
README.md

For high-level intro to how type checking works in rustc, see the type checking chapter of the rustc dev guide.