]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_ast_lowering/src/expr.rs
Remove unused span argument from `walk_fn`.
[rust.git] / compiler / rustc_ast_lowering / src / expr.rs
index 5346f1ced829477a0e022726268ab621202a37c0..f929549d70448100ea8c7f2516e4ac440f02066b 100644 (file)
@@ -851,7 +851,7 @@ fn lower_expr_closure(
 
         self.lower_lifetime_binder(closure_id, generic_params, |lctx, bound_generic_params| {
             // Lower outside new scope to preserve `is_in_loop_condition`.
-            let fn_decl = lctx.lower_fn_decl(decl, None, FnDeclKind::Closure, None);
+            let fn_decl = lctx.lower_fn_decl(decl, None, fn_decl_span, FnDeclKind::Closure, None);
 
             let c = lctx.arena.alloc(hir::Closure {
                 binder: binder_clause,
@@ -955,7 +955,8 @@ fn lower_expr_async_closure(
             // We need to lower the declaration outside the new scope, because we
             // have to conserve the state of being inside a loop condition for the
             // closure argument types.
-            let fn_decl = lctx.lower_fn_decl(&outer_decl, None, FnDeclKind::Closure, None);
+            let fn_decl =
+                lctx.lower_fn_decl(&outer_decl, None, fn_decl_span, FnDeclKind::Closure, None);
 
             let c = lctx.arena.alloc(hir::Closure {
                 binder: binder_clause,