Skip to content

Commit 9c0d9ba

Browse files
committed
Do not execute captures code for async fns
1 parent 5a184ac commit 9c0d9ba

File tree

1 file changed

+1
-1
lines changed
  • compiler/rustc_ast_lowering/src

1 file changed

+1
-1
lines changed

compiler/rustc_ast_lowering/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1877,7 +1877,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
18771877
let context = ImplTraitContext::ReturnPositionOpaqueTy {
18781878
origin: hir::OpaqueTyOrigin::FnReturn(fn_def_id),
18791879
};
1880-
self.lower_ty(ty, context, true)
1880+
self.lower_ty(ty, context, false)
18811881
}
18821882
FnRetTy::Default(ret_ty_span) => self.arena.alloc(self.ty_tup(*ret_ty_span, &[])),
18831883
};

0 commit comments

Comments
 (0)