]> 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 e29ad30d5f2ec7cb5a9e7aa4c0382912e45c6e85..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 =
@@ -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