]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_infer/src/infer/error_reporting/nice_region_error/util.rs
fold_region: remove unused parameter
[rust.git] / compiler / rustc_infer / src / infer / error_reporting / nice_region_error / util.rs
index 96b57b6cd2055e33d646e077fc51ace1c76d5063..42d52446ab6c72615887430790a430f2ae7a0c2b 100644 (file)
@@ -55,7 +55,7 @@ pub fn find_param_with_region<'tcx>(
 
     // Don't perform this on closures
     match hir.get(hir_id) {
-        hir::Node::Expr(&hir::Expr { kind: hir::ExprKind::Closure(..), .. }) => {
+        hir::Node::Expr(&hir::Expr { kind: hir::ExprKind::Closure { .. }, .. }) => {
             return None;
         }
         _ => {}
@@ -79,7 +79,7 @@ pub fn find_param_with_region<'tcx>(
             // May return None; sometimes the tables are not yet populated.
             let ty = fn_sig.inputs()[index];
             let mut found_anon_region = false;
-            let new_param_ty = tcx.fold_regions(ty, &mut false, |r, _| {
+            let new_param_ty = tcx.fold_regions(ty, |r, _| {
                 if r == anon_region {
                     found_anon_region = true;
                     replace_region