about summary refs log tree commit diff
path: root/compiler/rustc_ast_lowering
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2024-01-29 12:56:54 +0000
committerGitHub <noreply@github.com>2024-01-29 12:56:54 +0000
commiteaa100204e0f757f934b23db9bcbf570276e4018 (patch)
tree23d6a00d0400cb40624bc296a5feaa54129afc87 /compiler/rustc_ast_lowering
parent5de94a3c807f424334e0906ee772e4f1adf6cdda (diff)
parentb2b5b91bfbe5b39d17be3a14108fe7823627e0d8 (diff)
downloadrust-eaa100204e0f757f934b23db9bcbf570276e4018.tar.gz
rust-eaa100204e0f757f934b23db9bcbf570276e4018.zip
Rollup merge of #120428 - petrochenkov:somehir2, r=compiler-errors
hir: Two preparatory changes for #120206

cc https://github.com/rust-lang/rust/pull/120206
r? ```@compiler-errors```
Diffstat (limited to 'compiler/rustc_ast_lowering')
-rw-r--r--compiler/rustc_ast_lowering/src/expr.rs1
-rw-r--r--compiler/rustc_ast_lowering/src/lib.rs5
2 files changed, 4 insertions, 2 deletions
diff --git a/compiler/rustc_ast_lowering/src/expr.rs b/compiler/rustc_ast_lowering/src/expr.rs
index cc172b37657..0ad4a59c17e 100644
--- a/compiler/rustc_ast_lowering/src/expr.rs
+++ b/compiler/rustc_ast_lowering/src/expr.rs
@@ -153,7 +153,6 @@ impl<'hir> LoweringContext<'_, 'hir> {
                 }
                 ExprKind::Let(pat, scrutinee, span, is_recovered) => {
                     hir::ExprKind::Let(self.arena.alloc(hir::Let {
-                        hir_id: self.next_id(),
                         span: self.lower_span(*span),
                         pat: self.lower_pat(pat),
                         ty: None,
diff --git a/compiler/rustc_ast_lowering/src/lib.rs b/compiler/rustc_ast_lowering/src/lib.rs
index ee1f5d5bd7a..3621844efc8 100644
--- a/compiler/rustc_ast_lowering/src/lib.rs
+++ b/compiler/rustc_ast_lowering/src/lib.rs
@@ -2305,7 +2305,10 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
         match c.value.kind {
             ExprKind::Underscore => {
                 if self.tcx.features().generic_arg_infer {
-                    hir::ArrayLen::Infer(self.lower_node_id(c.id), self.lower_span(c.value.span))
+                    hir::ArrayLen::Infer(hir::InferArg {
+                        hir_id: self.lower_node_id(c.id),
+                        span: self.lower_span(c.value.span),
+                    })
                 } else {
                     feature_err(
                         &self.tcx.sess,