Add Ident to FnKind::Fn, just like with the immutable visitor

This commit is contained in:
Oli Scherer 2024-07-09 11:13:55 +00:00
parent e426f262fd
commit 6f85f20520
2 changed files with 17 additions and 8 deletions

View file

@ -144,7 +144,7 @@ impl<'a> MutVisitor for TestHarnessGenerator<'a> {
item.kind
{
let prev_tests = mem::take(&mut self.tests);
noop_visit_item_kind(&mut item.kind, item.span, item.id, self);
noop_visit_item_kind(&mut item.kind, item.ident, item.span, item.id, 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.