Skip to content

Commit 21c80fa

Browse files
committed
Use different hir ids for ConstArg and InferArg
1 parent 43baf21 commit 21c80fa

File tree

1 file changed

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

1 file changed

+2
-4
lines changed

compiler/rustc_ast_lowering/src/lib.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2034,13 +2034,11 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
20342034
match c.value.kind {
20352035
ExprKind::Underscore => {
20362036
if self.tcx.features().generic_arg_infer() {
2037-
let hir_id = self.lower_node_id(c.id);
20382037
let ct_kind = hir::ConstArgKind::Infer(hir::InferArg {
2039-
hir_id,
2038+
hir_id: self.lower_node_id(c.id),
20402039
span: self.lower_span(c.value.span),
20412040
});
2042-
// FIXME(void): should InferArg and ConstArg share the same hir_id?
2043-
self.arena.alloc(hir::ConstArg { hir_id, kind: ct_kind })
2041+
self.arena.alloc(hir::ConstArg { hir_id: self.next_id(), kind: ct_kind })
20442042
} else {
20452043
feature_err(
20462044
&self.tcx.sess,

0 commit comments

Comments
 (0)