Skip to content

Commit

Permalink
Add a debug asserts call to match_projection_projections to ensure in…
Browse files Browse the repository at this point in the history
…variant
  • Loading branch information
spastorino committed Apr 6, 2024
1 parent 83d0a94 commit 60be29b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions compiler/rustc_trait_selection/src/traits/select/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 60be29b

Please sign in to comment.