X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_trait_selection%2Fsrc%2Ftraits%2Fselect%2Fcandidate_assembly.rs;h=87d574ff107b29b9d4a09c1195566bf2f66a050d;hb=c18a5e8a5b1afb0d7a582fe9ebad4c1996c90da3;hp=8c291d1595d960a1c5bcc473127ac6044c022e41;hpb=8e0eecdba684b2d01fe4261f8fd367a7b4e913a6;p=rust.git diff --git a/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs b/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs index 8c291d1595d..87d574ff107 100644 --- a/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs +++ b/compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs @@ -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 = @@ -357,7 +357,7 @@ fn assemble_candidates_from_impls( // Before we create the substitutions and everything, first // consider a "quick reject". This avoids creating more types // and so forth that we need to. - let impl_trait_ref = self.tcx().bound_impl_trait_ref(impl_def_id).unwrap(); + let impl_trait_ref = self.tcx().impl_trait_ref(impl_def_id).unwrap(); if self.fast_reject_trait_refs(obligation, &impl_trait_ref.0) { return; } @@ -398,7 +398,7 @@ fn assemble_candidates_from_auto_impls( } ty::Param(..) | ty::Alias(ty::Projection, ..) => { // In these cases, we don't know what the actual - // type is. Therefore, we cannot break it down + // type is. Therefore, we cannot break it down // into its constituent types. So we don't // consider the `..` impl but instead just add no // candidates: this means that typeck will only