Skip to content

Commit c988800

Browse files
committed
Properly walk pat_lit and pat_range in visit.rs
Issue #1975
1 parent ffa187d commit c988800

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/rustc/syntax/visit.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,9 @@ fn visit_pat<E>(p: @pat, e: E, v: vt<E>) {
220220
visit_path(path, e, v);
221221
option::may(inner, {|subpat| v.visit_pat(subpat, e, v)});
222222
}
223-
_ { }
223+
pat_lit(ex) { v.visit_expr(ex, e, v); }
224+
pat_range(e1, e2) { v.visit_expr(e1, e, v); v.visit_expr(e2, e, v); }
225+
pat_wild {}
224226
}
225227
}
226228

0 commit comments

Comments
 (0)