Skip to content

Commit dc6bd6a

Browse files
committed
expand: simplify flat_map_item
1 parent fcce5fa commit dc6bd6a

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/librustc_expand/expand.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -1383,11 +1383,7 @@ impl<'a, 'b> MutVisitor for InvocationCollector<'a, 'b> {
13831383
_ => unreachable!(),
13841384
})
13851385
}
1386-
ast::ItemKind::Mod(ast::Mod { inner, .. }) => {
1387-
if item.ident == Ident::invalid() {
1388-
return noop_flat_map_item(item, self);
1389-
}
1390-
1386+
ast::ItemKind::Mod(ast::Mod { inner, .. }) if item.ident != Ident::invalid() => {
13911387
let orig_directory_ownership = self.cx.current_expansion.directory_ownership;
13921388
let mut module = (*self.cx.current_expansion.module).clone();
13931389
module.mod_path.push(item.ident);

0 commit comments

Comments
 (0)