Skip to content

Commit 12ec9f2

Browse files
committed
Don't put non-module ids into the table
1 parent 5869e5c commit 12ec9f2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

compiler/rustc_resolve/src/macros.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,9 @@ impl<'ra, 'tcx> ResolverExpand for Resolver<'ra, 'tcx> {
167167
}
168168

169169
fn mark_scope_with_compile_error(&mut self, id: NodeId) {
170-
if let Some(id) = self.opt_local_def_id(id) {
170+
if let Some(id) = self.opt_local_def_id(id)
171+
&& self.tcx.def_kind(id).is_module_like()
172+
{
171173
self.mods_with_parse_errors.insert(id.to_def_id());
172174
}
173175
}

0 commit comments

Comments
 (0)