Make function items in mut visitors all go through the same visit_fn function, just like with immutable visitors
This commit is contained in:
parent
c064b363b9
commit
1b9ac0011f
5 changed files with 64 additions and 42 deletions
|
@ -192,7 +192,7 @@ struct EntryPointCleaner<'a> {
|
|||
impl<'a> MutVisitor for EntryPointCleaner<'a> {
|
||||
fn flat_map_item(&mut self, i: P<ast::Item>) -> SmallVec<[P<ast::Item>; 1]> {
|
||||
self.depth += 1;
|
||||
let item = noop_flat_map_item(i, self).expect_one("noop did something");
|
||||
let item = noop_flat_map_item(i, None, self).expect_one("noop did something");
|
||||
self.depth -= 1;
|
||||
|
||||
// Remove any #[rustc_main] or #[start] from the AST so it doesn't
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue