Skip to content

Commit 7524f5e

Browse files
authored
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
2 parents 0b5a8ac + 60be29b commit 7524f5e

File tree

1 file changed

+2
-0
lines changed
  • compiler/rustc_trait_selection/src/traits/select

1 file changed

+2
-0
lines changed

Diff for: compiler/rustc_trait_selection/src/traits/select/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1732,6 +1732,8 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
17321732
env_predicate: PolyProjectionPredicate<'tcx>,
17331733
potentially_unnormalized_candidates: bool,
17341734
) -> ProjectionMatchesProjection {
1735+
debug_assert_eq!(obligation.predicate.def_id, env_predicate.projection_def_id());
1736+
17351737
let mut nested_obligations = Vec::new();
17361738
let infer_predicate = self.infcx.instantiate_binder_with_fresh_vars(
17371739
obligation.cause.span,

0 commit comments

Comments
 (0)