Skip to content

Commit

Permalink
Unrolled build for rust-lang#123559
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#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 rust-lang#123471.

r? `@compiler-errors`

`@bors` rollup=always
  • Loading branch information
rust-timer authored Apr 7, 2024
2 parents aa1c459 + 60be29b commit 4b63382
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 4b63382

Please sign in to comment.