Skip to content

Commit 77558c8

Browse files
committed
simplify thir visitor
1 parent 70b2f11 commit 77558c8

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

compiler/rustc_middle/src/thir/visit.rs

+1-7
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,7 @@ pub fn walk_expr<'thir, 'tcx: 'thir, V: Visitor<'thir, 'tcx>>(
7979
visitor.visit_pat(pat);
8080
}
8181
Loop { body } => visitor.visit_expr(&visitor.thir()[body]),
82-
LoopMatch { state, ref arms, .. } => {
83-
visitor.visit_expr(&visitor.thir()[state]);
84-
for &arm in &**arms {
85-
visitor.visit_arm(&visitor.thir()[arm]);
86-
}
87-
}
88-
Match { scrutinee, ref arms, .. } => {
82+
LoopMatch { state: scrutinee, ref arms, .. } | Match { scrutinee, ref arms, .. } => {
8983
visitor.visit_expr(&visitor.thir()[scrutinee]);
9084
for &arm in &**arms {
9185
visitor.visit_arm(&visitor.thir()[arm]);

0 commit comments

Comments
 (0)