diff options
| author | Michael Goulet <michael@errs.io> | 2023-10-02 21:31:46 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2023-10-03 02:25:32 +0000 |
| commit | 2934fe07b7fd60760e0e9e7d509601b893d7b3fd (patch) | |
| tree | b88babc5a8361f65b76c865fae51d8b8c19b3ff2 /compiler/rustc_ast_lowering/src | |
| parent | 2e5a9dd6c9eaa42f0684b4b760bd68fc27cbe51b (diff) | |
| download | rust-2934fe07b7fd60760e0e9e7d509601b893d7b3fd.tar.gz rust-2934fe07b7fd60760e0e9e7d509601b893d7b3fd.zip | |
Point to full async fn for future
Diffstat (limited to 'compiler/rustc_ast_lowering/src')
| -rw-r--r-- | compiler/rustc_ast_lowering/src/lib.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_ast_lowering/src/lib.rs b/compiler/rustc_ast_lowering/src/lib.rs index 85ab5e7223b..7e3ada9c123 100644 --- a/compiler/rustc_ast_lowering/src/lib.rs +++ b/compiler/rustc_ast_lowering/src/lib.rs @@ -1824,7 +1824,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> { } let fn_def_id = self.local_def_id(fn_node_id); - self.lower_async_fn_ret_ty(&decl.output, fn_def_id, ret_id, kind) + self.lower_async_fn_ret_ty(&decl.output, fn_def_id, ret_id, kind, fn_span) } else { match &decl.output { FnRetTy::Ty(ty) => { @@ -1901,8 +1901,9 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> { fn_def_id: LocalDefId, opaque_ty_node_id: NodeId, fn_kind: FnDeclKind, + fn_span: Span, ) -> hir::FnRetTy<'hir> { - let span = self.lower_span(output.span()); + let span = self.lower_span(fn_span); let opaque_ty_span = self.mark_span_with_reason(DesugaringKind::Async, span, None); let captured_lifetimes: Vec<_> = self |
