or-patterns: remove hack from lowering.

This commit is contained in:
Mazdak Farrokhzad 2019-09-07 15:49:58 +02:00
parent 60895fd1f9
commit 146cb8eda6
3 changed files with 19 additions and 63 deletions

View file

@ -834,8 +834,6 @@ pub fn walk_param<'a, V: Visitor<'a>>(visitor: &mut V, param: &'a Param) {
pub fn walk_arm<'a, V: Visitor<'a>>(visitor: &mut V, arm: &'a Arm) {
visitor.visit_pat(&arm.pat);
// NOTE(or_patterns; Centril | dlrobertson):
// If you change this, also change the hack in `lowering.rs`.
walk_list!(visitor, visit_expr, &arm.guard);
visitor.visit_expr(&arm.body);
walk_list!(visitor, visit_attribute, &arm.attrs);