Skip to content

Commit 096f454

Browse files
Filter predicates first for fast-path type flags
1 parent 4c83bd0 commit 096f454

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,8 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
174174
.param_env
175175
.caller_bounds()
176176
.iter()
177-
.filter_map(|p| p.to_opt_poly_trait_pred())
178-
.filter(|p| !p.references_error());
177+
.filter(|p| !p.references_error())
178+
.filter_map(|p| p.to_opt_poly_trait_pred());
179179

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

0 commit comments

Comments
 (0)