diff options
| author | Fabian Drinck <fabian.drinck@rwth-aachen.de> | 2019-03-16 16:49:13 +0100 |
|---|---|---|
| committer | Fabian Drinck <fabian.drinck@rwth-aachen.de> | 2019-03-30 22:37:02 +0100 |
| commit | 2cebbe25995f308fe6ed72a246f9d2ea633addf9 (patch) | |
| tree | 4d6dad887e05e4938871f7fd3580c247e3cd3ff2 /src | |
| parent | 541c4999a9e878f26ada62bc9a82f088a8f2fad2 (diff) | |
| download | rust-2cebbe25995f308fe6ed72a246f9d2ea633addf9.tar.gz rust-2cebbe25995f308fe6ed72a246f9d2ea633addf9.zip | |
Edit comments
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc_resolve/resolve_imports.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/librustc_resolve/resolve_imports.rs b/src/librustc_resolve/resolve_imports.rs index b40b68b0853..534e5e0ff45 100644 --- a/src/librustc_resolve/resolve_imports.rs +++ b/src/librustc_resolve/resolve_imports.rs @@ -1252,11 +1252,13 @@ impl<'a, 'b:'a> ImportResolver<'a, 'b> { target_bindings: &PerNS<Cell<Option<&'b NameBinding<'b>>>>, target: Ident, ) { - // Check if we are at the root of a macro expansion and skip if we are. + // Skip if the import was produced by a macro. if directive.parent_scope.expansion != Mark::root() { return; } + // Skip if we are inside a named module (in contrast to an anonymous + // module defined by a block). if let ModuleKind::Def(_, _) = directive.parent_scope.module.kind { return; } |
