]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_ast_lowering/src/lib.rs
Auto merge of #104809 - matthiaskrgr:rollup-8abjdwh, r=matthiaskrgr
[rust.git] / compiler / rustc_ast_lowering / src / lib.rs
index 578b5417c86ec137ecae29ad02acaaf3a2dc613d..d1666dfbf64446d996fbd51f54828f77c2280fea 100644 (file)
@@ -1815,9 +1815,11 @@ fn lower_async_fn_ret_ty(
 
         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: