Skip to content

Commit 2cebbe2

Browse files
Edit comments
1 parent 541c499 commit 2cebbe2

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
@@ -1252,11 +1252,13 @@ impl<'a, 'b:'a> ImportResolver<'a, 'b> {
12521252
target_bindings: &PerNS<Cell<Option<&'b NameBinding<'b>>>>,
12531253
target: Ident,
12541254
) {
1255-
// Check if we are at the root of a macro expansion and skip if we are.
1255+
// Skip if the import was produced by a macro.
12561256
if directive.parent_scope.expansion != Mark::root() {
12571257
return;
12581258
}
12591259

1260+
// Skip if we are inside a named module (in contrast to an anonymous
1261+
// module defined by a block).
12601262
if let ModuleKind::Def(_, _) = directive.parent_scope.module.kind {
12611263
return;
12621264
}

0 commit comments

Comments
 (0)