about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-09-21 15:18:58 -0400
committerGitHub <noreply@github.com>2024-09-21 15:18:58 -0400
commitd1b43d09e3519d879bd34f984000a1f072852d65 (patch)
treec0a0595b5a04e1290a031eef1da40033c5455f03 /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
parent2e43793fd66d5350004c38651e5d20313a3c3526 (diff)
parent4f3d06f5aa23e0447e477e35915ba2706351a073 (diff)
downloadrust-d1b43d09e3519d879bd34f984000a1f072852d65.tar.gz
rust-d1b43d09e3519d879bd34f984000a1f072852d65.zip
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.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions