Skip to content

Commit

Permalink
Filter predicates first for fast-path type flags
Browse files Browse the repository at this point in the history
  • Loading branch information
compiler-errors committed Jan 20, 2023
1 parent 4c83bd0 commit 096f454
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 096f454

Please sign in to comment.