1
Fork 0

rustc_builtin_macros: remove ref patterns

... and other pattern matching improvements
This commit is contained in:
Maybe Waffle 2022-12-06 13:22:36 +00:00
parent 244990a6e9
commit 700c095306
16 changed files with 177 additions and 197 deletions

View file

@ -131,8 +131,9 @@ impl<'a> MutVisitor for TestHarnessGenerator<'a> {
// We don't want to recurse into anything other than mods, since
// mods or tests inside of functions will break things
if let ast::ItemKind::Mod(_, ModKind::Loaded(.., ref spans)) = item.kind {
let ast::ModSpans { inner_span: span, inject_use_span: _ } = *spans;
if let ast::ItemKind::Mod(_, ModKind::Loaded(.., ast::ModSpans { inner_span: span, .. })) =
item.kind
{
let prev_tests = mem::take(&mut self.tests);
noop_visit_item_kind(&mut item.kind, self);
self.add_test_cases(item.id, span, prev_tests);