Rollup merge of #104615 - spastorino:create-async-def-id-in-lowering, r=compiler-errors

Create def_id for async fns during lowering

r? `@compiler-errors`
This commit is contained in:
Dylan DPC
2022-11-22 16:36:37 +05:30
committed by GitHub
2 changed files with 5 additions and 8 deletions

View File

@@ -1817,9 +1817,11 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
let opaque_ty_span = self.mark_span_with_reason(DesugaringKind::Async, span, None);
let opaque_ty_def_id = self.local_def_id(opaque_ty_node_id);
let fn_def_id = self.local_def_id(fn_node_id);
let opaque_ty_def_id =
self.create_def(fn_def_id, opaque_ty_node_id, DefPathData::ImplTrait);
// When we create the opaque type for this async fn, it is going to have
// to capture all the lifetimes involved in the signature (including in the
// return type). This is done by introducing lifetime parameters for: