Skip to content

Commit d98e805

Browse files
committed
Fix missing HIR ownership recording
1 parent a9874b2 commit d98e805

File tree

1 file changed

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

1 file changed

+4
-1
lines changed

compiler/rustc_ast_lowering/src/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1197,6 +1197,8 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
11971197
DefKind::AnonConst,
11981198
span,
11991199
);
1200+
let hir_id = self.lower_node_id(node_id);
1201+
self.children.push((def_id, hir::MaybeOwner::NonOwner(hir_id)));
12001202

12011203
let path_expr = Expr {
12021204
id: ty_id,
@@ -1209,7 +1211,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
12091211
let ct = self.with_new_scopes(span, |this| {
12101212
self.arena.alloc(hir::AnonConst {
12111213
def_id,
1212-
hir_id: this.lower_node_id(node_id),
1214+
hir_id,
12131215
body: this.lower_const_body(path_expr.span, Some(&path_expr)),
12141216
span,
12151217
})
@@ -1255,6 +1257,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
12551257
}
12561258

12571259
let lowered_anon = self.lower_anon_const(anon);
1260+
self.children.push((lowered_anon.def_id, hir::MaybeOwner::NonOwner(lowered_anon.hir_id)));
12581261
ConstArg {
12591262
hir_id: self.next_id(),
12601263
kind: ConstArgKind::Anon(lowered_anon),

0 commit comments

Comments
 (0)