loop {
match parser.parse_item(ForceCollect::No) {
Ok(Some(item)) => match &item.kind {
- // Tests with one of these items are ignored
- ItemKind::Static(..)
- | ItemKind::Const(..)
- | ItemKind::ExternCrate(..)
- | ItemKind::ForeignMod(..) => return false,
- // We found a main function ...
ItemKind::Fn(box Fn {
sig, body: Some(block), ..
}) if item.ident.name == sym::main => {
return false;
}
},
- // Another function was found; this case is ignored too
- ItemKind::Fn(..) => return false,
+ // Tests with one of these items are ignored
+ ItemKind::Static(..)
+ | ItemKind::Const(..)
+ | ItemKind::ExternCrate(..)
+ | ItemKind::ForeignMod(..)
+ // Another function was found; this case is ignored
+ | ItemKind::Fn(..) => return false,
_ => {},
},
Ok(None) => break,