Rollup merge of #123559 - spastorino:match_projection_projections_invariant, r=compiler-errors

Add a debug asserts call to match_projection_projections to ensure invariant

Small nit as follow up of #123471.

r? `@compiler-errors`

`@bors` rollup=always
This commit is contained in:
Matthias Krüger 2024-04-07 00:51:27 +02:00 committed by GitHub
commit 7524f5e1b9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1732,6 +1732,8 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
env_predicate: PolyProjectionPredicate<'tcx>,
potentially_unnormalized_candidates: bool,
) -> ProjectionMatchesProjection {
debug_assert_eq!(obligation.predicate.def_id, env_predicate.projection_def_id());
let mut nested_obligations = Vec::new();
let infer_predicate = self.infcx.instantiate_binder_with_fresh_vars(
obligation.cause.span,