Filter predicates first for fast-path type flags

This commit is contained in:
Michael Goulet 2023-01-20 03:20:17 +00:00
parent 4c83bd03a9
commit 096f454774

View File

@ -174,8 +174,8 @@ fn assemble_candidates_from_caller_bounds<'o>(
.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 =