mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 23:12:02 +00:00
Fix ICE on a macro in a constant integer position that expands into other macros.
This commit is contained in:
parent
755516bb96
commit
316f7bb1a8
@ -172,10 +172,13 @@ impl<'a> Resolver<'a> {
|
||||
|
||||
let mut def_collector = DefCollector::new(&mut self.definitions);
|
||||
def_collector.visit_macro_invoc = Some(visit_macro_invoc);
|
||||
def_collector.with_parent(def_index, |def_collector| if !const_integer {
|
||||
expansion.visit_with(def_collector)
|
||||
} else if let Expansion::Expr(ref expr) = *expansion {
|
||||
def_collector.with_parent(def_index, |def_collector| {
|
||||
if const_integer {
|
||||
if let Expansion::Expr(ref expr) = *expansion {
|
||||
def_collector.visit_ast_const_integer(expr);
|
||||
}
|
||||
}
|
||||
expansion.visit_with(def_collector)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user