Skip to content

Commit 60be29b

Browse files
committed
Add a debug asserts call to match_projection_projections to ensure invariant
1 parent 83d0a94 commit 60be29b

File tree

1 file changed

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

1 file changed

+2
-0
lines changed

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)