diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-07-09 05:02:00 +0000 |
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-07-22 14:01:23 +0000 |
| commit | 1b9ac0011f8c871edf9515503e9e38fb7d1c777b (patch) | |
| tree | efccac4d497022c225aae76486a2597d6623f661 /compiler/rustc_expand/src/placeholders.rs | |
| parent | c064b363b912857303f081de537514bf5190e5d2 (diff) | |
| download | rust-1b9ac0011f8c871edf9515503e9e38fb7d1c777b.tar.gz rust-1b9ac0011f8c871edf9515503e9e38fb7d1c777b.zip | |
Make function items in mut visitors all go through the same visit_fn function, just like with immutable visitors
Diffstat (limited to 'compiler/rustc_expand/src/placeholders.rs')
| -rw-r--r-- | compiler/rustc_expand/src/placeholders.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_expand/src/placeholders.rs b/compiler/rustc_expand/src/placeholders.rs index 0817c287644..2ed968f57bc 100644 --- a/compiler/rustc_expand/src/placeholders.rs +++ b/compiler/rustc_expand/src/placeholders.rs @@ -267,7 +267,7 @@ impl MutVisitor for PlaceholderExpander { fn flat_map_item(&mut self, item: P<ast::Item>) -> SmallVec<[P<ast::Item>; 1]> { match item.kind { ast::ItemKind::MacCall(_) => self.remove(item.id).make_items(), - _ => noop_flat_map_item(item, self), + _ => noop_flat_map_item(item, None, self), } } @@ -284,7 +284,7 @@ impl MutVisitor for PlaceholderExpander { AssocCtxt::Impl => it.make_impl_items(), } } - _ => noop_flat_map_item(item, self), + _ => noop_flat_map_item(item, Some(ctxt), self), } } @@ -294,7 +294,7 @@ impl MutVisitor for PlaceholderExpander { ) -> SmallVec<[P<ast::ForeignItem>; 1]> { match item.kind { ast::ForeignItemKind::MacCall(_) => self.remove(item.id).make_foreign_items(), - _ => noop_flat_map_item(item, self), + _ => noop_flat_map_item(item, None, self), } } |
