commit | 6758875ee6bc711736c5440ca940e8624e893a14 | [log] [tgz] |
---|---|---|
author | David Tolnay <dtolnay@gmail.com> | Sun Oct 30 12:23:10 2016 -0700 |
committer | David Tolnay <dtolnay@gmail.com> | Sun Oct 30 12:23:53 2016 -0700 |
tree | 89fe7c1de82b8038aadd5e0e2742db74c5e7d624 | |
parent | 67370bbd878617d8860633a63d7f5a02993c076e [diff] [blame] |
Allow array index as constant expression
diff --git a/src/visit.rs b/src/visit.rs index b9fd8fb..0836a75 100644 --- a/src/visit.rs +++ b/src/visit.rs
@@ -283,6 +283,10 @@ ConstExpr::Path(ref path) => { visitor.visit_path(path); } + ConstExpr::Index(ref expr, ref index) => { + visitor.visit_const_expr(expr); + visitor.visit_const_expr(index); + } ConstExpr::Paren(ref expr) => { visitor.visit_const_expr(expr); }