diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-12-31 09:59:37 +0100 |
|---|---|---|
| committer | Mazdak Farrokhzad <twingoow@gmail.com> | 2020-02-13 11:25:34 +0100 |
| commit | dc6bd6a12347f27c937c19adfda542f694fb61c5 (patch) | |
| tree | 423c4ffa369a7b896cec0406f190a70842635e01 /src | |
| parent | fcce5fa6e7ba67db63674dc7369125875c7f39a2 (diff) | |
| download | rust-dc6bd6a12347f27c937c19adfda542f694fb61c5.tar.gz rust-dc6bd6a12347f27c937c19adfda542f694fb61c5.zip | |
expand: simplify flat_map_item
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc_expand/expand.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/librustc_expand/expand.rs b/src/librustc_expand/expand.rs index 91195d379d7..ee0b7fa00de 100644 --- a/src/librustc_expand/expand.rs +++ b/src/librustc_expand/expand.rs @@ -1383,11 +1383,7 @@ impl<'a, 'b> MutVisitor for InvocationCollector<'a, 'b> { _ => unreachable!(), }) } - ast::ItemKind::Mod(ast::Mod { inner, .. }) => { - if item.ident == Ident::invalid() { - return noop_flat_map_item(item, self); - } - + ast::ItemKind::Mod(ast::Mod { inner, .. }) if item.ident != Ident::invalid() => { let orig_directory_ownership = self.cx.current_expansion.directory_ownership; let mut module = (*self.cx.current_expansion.module).clone(); module.mod_path.push(item.ident); |
