1
Fork 0

rustc_ast: Do not panic by default when visiting macro calls

This commit is contained in:
Vadim Petrochenkov 2020-11-03 20:26:17 +03:00
parent 0cd1516696
commit 3237b3886c
16 changed files with 8 additions and 71 deletions

View file

@ -344,10 +344,6 @@ impl<'a> Visitor<'a> for CollectProcMacros<'a> {
visit::walk_item(self, item);
self.in_root = prev_in_root;
}
fn visit_mac(&mut self, mac: &'a ast::MacCall) {
visit::walk_mac(self, mac)
}
}
// Creates a new module which looks like:

View file

@ -130,10 +130,6 @@ impl<'a> MutVisitor for TestHarnessGenerator<'a> {
}
smallvec![P(item)]
}
fn visit_mac(&mut self, _mac: &mut ast::MacCall) {
// Do nothing.
}
}
// Beware, this is duplicated in librustc_passes/entry.rs (with
@ -201,10 +197,6 @@ impl<'a> MutVisitor for EntryPointCleaner<'a> {
smallvec![item]
}
fn visit_mac(&mut self, _mac: &mut ast::MacCall) {
// Do nothing.
}
}
/// Crawl over the crate, inserting test reexports and the test main function