Skip to content

Commit f1dc172

Browse files
committed
Call visit_mod_outside_ast from visit_cfg_if
1 parent 29109ee commit f1dc172

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

src/modules.rs

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -151,19 +151,7 @@ impl<'ast, 'sess, 'c> ModResolver<'ast, 'sess> {
151151
fn visit_cfg_if(&mut self, item: &ast::Item) -> Result<(), ModuleResolutionError> {
152152
let mut visitor = visitor::CfgIfVisitor::new(self.parse_sess);
153153
visitor.visit_item(item);
154-
for item in visitor.items {
155-
if let ast::ItemKind::Mod(_, ref sub_mod_kind) = item.kind {
156-
self.visit_sub_mod(
157-
&item,
158-
Module::new(
159-
item.span,
160-
Some(Cow::Owned(sub_mod_kind.clone())),
161-
Cow::Owned(ThinVec::new()),
162-
Cow::Owned(ast::AttrVec::new()),
163-
),
164-
)?;
165-
}
166-
}
154+
self.visit_mod_outside_ast(&visitor.items)?;
167155
Ok(())
168156
}
169157

0 commit comments

Comments
 (0)