]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_trait_selection/src/traits/select/candidate_assembly.rs
Auto merge of #107142 - cuviper:relnotes-1.67, r=Mark-Simulacrum
[rust.git] / compiler / rustc_trait_selection / src / traits / select / candidate_assembly.rs
index 8c291d1595d960a1c5bcc473127ac6044c022e41..87d574ff107b29b9d4a09c1195566bf2f66a050d 100644 (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 =
@@ -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