Skip to content

Commit 3ebe11b

Browse files
authored
Rollup merge of #137221 - bjorn3:remove_unused_field, r=compiler-errors
Remove scrutinee_hir_id from ExprKind::Match It is unused.
2 parents b7c2da2 + 768a5bd commit 3ebe11b

File tree

3 files changed

+1
-3
lines changed

3 files changed

+1
-3
lines changed

compiler/rustc_middle/src/thir.rs

-1
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,6 @@ pub enum ExprKind<'tcx> {
376376
/// A `match` expression.
377377
Match {
378378
scrutinee: ExprId,
379-
scrutinee_hir_id: HirId,
380379
arms: Box<[ArmId]>,
381380
match_source: MatchSource,
382381
},

compiler/rustc_mir_build/src/thir/cx/expr.rs

-1
Original file line numberDiff line numberDiff line change
@@ -828,7 +828,6 @@ impl<'tcx> ThirBuildCx<'tcx> {
828828
},
829829
hir::ExprKind::Match(discr, arms, match_source) => ExprKind::Match {
830830
scrutinee: self.mirror_expr(discr),
831-
scrutinee_hir_id: discr.hir_id,
832831
arms: arms.iter().map(|a| self.convert_arm(a)).collect(),
833832
match_source,
834833
},

compiler/rustc_mir_build/src/thir/pattern/check_match.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ impl<'p, 'tcx> Visitor<'p, 'tcx> for MatchVisitor<'p, 'tcx> {
151151
}
152152
return;
153153
}
154-
ExprKind::Match { scrutinee, scrutinee_hir_id: _, box ref arms, match_source } => {
154+
ExprKind::Match { scrutinee, box ref arms, match_source } => {
155155
self.check_match(scrutinee, arms, match_source, ex.span);
156156
}
157157
ExprKind::Let { box ref pat, expr } => {

0 commit comments

Comments
 (0)