Skip to content

Commit 693ccea

Browse files
committed
Fix missing HIR ownership recording
1 parent eee854f commit 693ccea

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
@@ -1195,6 +1195,8 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
11951195
DefKind::AnonConst,
11961196
span,
11971197
);
1198+
let hir_id = self.lower_node_id(node_id);
1199+
self.children.push((def_id, hir::MaybeOwner::NonOwner(hir_id)));
11981200

11991201
let path_expr = Expr {
12001202
id: ty_id,
@@ -1207,7 +1209,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
12071209
let ct = self.with_new_scopes(span, |this| {
12081210
self.arena.alloc(hir::AnonConst {
12091211
def_id,
1210-
hir_id: this.lower_node_id(node_id),
1212+
hir_id,
12111213
body: this.lower_const_body(path_expr.span, Some(&path_expr)),
12121214
span,
12131215
})
@@ -1253,6 +1255,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
12531255
}
12541256

12551257
let lowered_anon = self.lower_anon_const(anon);
1258+
self.children.push((lowered_anon.def_id, hir::MaybeOwner::NonOwner(lowered_anon.hir_id)));
12561259
ConstArg {
12571260
hir_id: self.next_id(),
12581261
kind: ConstArgKind::Anon(lowered_anon),

0 commit comments

Comments
 (0)