summary refs log tree commit diff
path: root/compiler/rustc_ast_lowering/src
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2022-11-22 16:36:37 +0530
committerGitHub <noreply@github.com>2022-11-22 16:36:37 +0530
commit88542a31504ccc39f0e75a7cd5d1b4bee0fbc329 (patch)
treeec3b54e15b93a1ce6cd916d20f86564bca16d6b0 /compiler/rustc_ast_lowering/src
parent20d6a44334e189989a99f2f914b243dd81e88968 (diff)
parent520fafe5c2b3fe20c89282dc0c0fbc6395e4c2e2 (diff)
downloadrust-88542a31504ccc39f0e75a7cd5d1b4bee0fbc329.tar.gz
rust-88542a31504ccc39f0e75a7cd5d1b4bee0fbc329.zip
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`
Diffstat (limited to 'compiler/rustc_ast_lowering/src')
-rw-r--r--compiler/rustc_ast_lowering/src/lib.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_ast_lowering/src/lib.rs b/compiler/rustc_ast_lowering/src/lib.rs
index ce81a0ae959..bd1876d4284 100644
--- a/compiler/rustc_ast_lowering/src/lib.rs
+++ b/compiler/rustc_ast_lowering/src/lib.rs
@@ -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: