]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_hir_typeck/src/lib.rs
Rollup merge of #106353 - lukas-code:reduce-red-lines-in-my-ide, r=wesleywiser
[rust.git] / compiler / rustc_hir_typeck / src / lib.rs
index 5b2352cda34b3ee5fa9bcfa2f98d11acee4af2c4..cecf3d3f1e0644c2656924a4e4aa10cf13f9a7bc 100644 (file)
@@ -240,10 +240,8 @@ fn typeck_with_fallback<'tcx>(
                         }),
                         Node::Expr(&hir::Expr { kind: hir::ExprKind::InlineAsm(asm), .. })
                         | Node::Item(&hir::Item { kind: hir::ItemKind::GlobalAsm(asm), .. }) => {
-                            let operand_ty = asm
-                                .operands
-                                .iter()
-                                .filter_map(|(op, _op_sp)| match op {
+                            let operand_ty =
+                                asm.operands.iter().find_map(|(op, _op_sp)| match op {
                                     hir::InlineAsmOperand::Const { anon_const }
                                         if anon_const.hir_id == id =>
                                     {
@@ -259,8 +257,7 @@ fn typeck_with_fallback<'tcx>(
                                         }))
                                     }
                                     _ => None,
-                                })
-                                .next();
+                                });
                             operand_ty.unwrap_or_else(fallback)
                         }
                         _ => fallback(),
@@ -462,8 +459,8 @@ fn fatally_break_rust(sess: &Session) {
     ));
 }
 
-fn has_expected_num_generic_args<'tcx>(
-    tcx: TyCtxt<'tcx>,
+fn has_expected_num_generic_args(
+    tcx: TyCtxt<'_>,
     trait_did: Option<DefId>,
     expected: usize,
 ) -> bool {