Skip to content

Commit 6b39f6e

Browse files
committed
Don't put non-module ids into the table
1 parent 87af5f5 commit 6b39f6e

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
@@ -168,7 +168,9 @@ impl<'ra, 'tcx> ResolverExpand for Resolver<'ra, 'tcx> {
168168
}
169169

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

0 commit comments

Comments
 (0)