Skip to content

Commit

Permalink
Rollup merge of rust-lang#107101 - compiler-errors:perf-106309-1, r=p…
Browse files Browse the repository at this point in the history
…etrochenkov

Filter param-env predicates for errors before calling `to_opt_poly_trait_pred`

cc rust-lang#106309 rust-lang#106757 (comment)

r? `@ghost`
  • Loading branch information
JohnTitor authored Jan 23, 2023
2 parents ae15d10 + 096f454 commit 1702349
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
.param_env
.caller_bounds()
.iter()
.filter_map(|p| p.to_opt_poly_trait_pred())
.filter(|p| !p.references_error());
.filter(|p| !p.references_error())
.filter_map(|p| p.to_opt_poly_trait_pred());

// Micro-optimization: filter out predicates relating to different traits.
let matching_bounds =
Expand Down

0 comments on commit 1702349

Please sign in to comment.