Skip to content

Commit 1129a34

Browse files
Edit comments
1 parent 6671096 commit 1129a34

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/librustc_resolve/resolve_imports.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1255,11 +1255,13 @@ impl<'a, 'b:'a> ImportResolver<'a, 'b> {
12551255
target_bindings: &PerNS<Cell<Option<&'b NameBinding<'b>>>>,
12561256
target: Ident,
12571257
) {
1258-
// Check if we are at the root of a macro expansion and skip if we are.
1258+
// Skip if the import was produced by a macro.
12591259
if directive.parent_scope.expansion != Mark::root() {
12601260
return;
12611261
}
12621262

1263+
// Skip if we are inside a named module (in contrast to an anonymous
1264+
// module defined by a block).
12631265
if let ModuleKind::Def(_, _) = directive.parent_scope.module.kind {
12641266
return;
12651267
}

0 commit comments

Comments
 (0)