File tree 2 files changed +22
-3
lines changed
2 files changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -172,10 +172,13 @@ impl<'a> Resolver<'a> {
172
172
173
173
let mut def_collector = DefCollector :: new ( & mut self . definitions ) ;
174
174
def_collector. visit_macro_invoc = Some ( visit_macro_invoc) ;
175
- def_collector. with_parent ( def_index, |def_collector| if !const_integer {
175
+ def_collector. with_parent ( def_index, |def_collector| {
176
+ if const_integer {
177
+ if let Expansion :: Expr ( ref expr) = * expansion {
178
+ def_collector. visit_ast_const_integer ( expr) ;
179
+ }
180
+ }
176
181
expansion. visit_with ( def_collector)
177
- } else if let Expansion :: Expr ( ref expr) = * expansion {
178
- def_collector. visit_ast_const_integer ( expr) ;
179
182
} ) ;
180
183
}
181
184
}
Original file line number Diff line number Diff line change
1
+ // Copyright 2016 The Rust Project Developers. See the COPYRIGHT
2
+ // file at the top-level directory of this distribution and at
3
+ // http://rust-lang.org/COPYRIGHT.
4
+ //
5
+ // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6
+ // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7
+ // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8
+ // option. This file may not be copied, modified, or distributed
9
+ // except according to those terms.
10
+
11
+ macro_rules! m { ( ) => { 1 } }
12
+ macro_rules! n { ( ) => { 1 + m!( ) } }
13
+
14
+ fn main ( ) {
15
+ let _: [ u32 ; n ! ( ) ] = [ 0 , 0 ] ;
16
+ }
You can’t perform that action at this time.
0 commit comments