Clean up convoluted macros_only logic
This commit is contained in:
parent
e821a6ef78
commit
675059a9eb
1 changed files with 8 additions and 12 deletions
|
@ -1055,19 +1055,15 @@ impl<'a, 'tcx> CrateMetadataRef<'a> {
|
||||||
|
|
||||||
// Iterate over all children.
|
// Iterate over all children.
|
||||||
let macros_only = self.dep_kind.lock().macros_only();
|
let macros_only = self.dep_kind.lock().macros_only();
|
||||||
|
if !macros_only {
|
||||||
let children = self.root.tables.children.get(self, id).unwrap_or_else(Lazy::empty);
|
let children = self.root.tables.children.get(self, id).unwrap_or_else(Lazy::empty);
|
||||||
for child_index in children.decode((self, sess)) {
|
|
||||||
if macros_only {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
for child_index in children.decode((self, sess)) {
|
||||||
// Get the item.
|
// Get the item.
|
||||||
if let Some(child_kind) = self.maybe_kind(child_index) {
|
let child_kind = match self.maybe_kind(child_index) {
|
||||||
match child_kind {
|
Some(child_kind) => child_kind,
|
||||||
EntryKind::MacroDef(..) => {}
|
None => continue,
|
||||||
_ if macros_only => continue,
|
};
|
||||||
_ => {}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Hand off the item to the callback.
|
// Hand off the item to the callback.
|
||||||
match child_kind {
|
match child_kind {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue