Rollup merge of #132787 - maxcabrajac:fnctxt, r=petrochenkov
Unify FnKind between AST visitors and make WalkItemKind more straight forward Unifying `FnKind` requires a bunch of changes to `WalkItemKind::walk` signature so I'll change them in one go related to #128974 r? `@petrochenkov`
This commit is contained in:
commit
6b47c6d786
10 changed files with 157 additions and 88 deletions
|
@ -204,10 +204,10 @@ impl MutVisitor for CfgEval<'_> {
|
|||
fn flat_map_assoc_item(
|
||||
&mut self,
|
||||
item: P<ast::AssocItem>,
|
||||
_ctxt: AssocCtxt,
|
||||
ctxt: AssocCtxt,
|
||||
) -> SmallVec<[P<ast::AssocItem>; 1]> {
|
||||
let item = configure!(self, item);
|
||||
mut_visit::walk_flat_map_item(self, item)
|
||||
mut_visit::walk_flat_map_assoc_item(self, item, ctxt)
|
||||
}
|
||||
|
||||
fn flat_map_foreign_item(
|
||||
|
|
|
@ -144,7 +144,15 @@ impl<'a> MutVisitor for TestHarnessGenerator<'a> {
|
|||
item.kind
|
||||
{
|
||||
let prev_tests = mem::take(&mut self.tests);
|
||||
walk_item_kind(&mut item.kind, item.span, item.id, self);
|
||||
walk_item_kind(
|
||||
&mut item.kind,
|
||||
item.span,
|
||||
item.id,
|
||||
&mut item.ident,
|
||||
&mut item.vis,
|
||||
(),
|
||||
self,
|
||||
);
|
||||
self.add_test_cases(item.id, span, prev_tests);
|
||||
} else {
|
||||
// But in those cases, we emit a lint to warn the user of these missing tests.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue