Skip to content

Commit

Permalink
Rename to mods_with_parse_errors
Browse files Browse the repository at this point in the history
  • Loading branch information
estebank committed Dec 7, 2024
1 parent d5c0728 commit 8f7eff9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_resolve/src/build_reduced_graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,7 @@ impl<'a, 'ra, 'tcx> BuildReducedGraphVisitor<'a, 'ra, 'tcx> {
self.r.define(parent, ident, TypeNS, (module, vis, sp, expansion));

if let ast::ModKind::Loaded(_, _, _, Err(_)) = mod_kind {
self.r.mod_with_parse_errors.insert(def_id);
self.r.mods_with_parse_errors.insert(def_id);
}

// Descend into the module.
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_resolve/src/ident.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1602,7 +1602,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {

let maybe_assoc = opt_ns != Some(MacroNS) && PathSource::Type.is_expected(res);
if let Some(next_module) = binding.module() {
if self.mod_with_parse_errors.contains(&next_module.def_id()) {
if self.mods_with_parse_errors.contains(&next_module.def_id()) {
module_had_parse_errors = true;
}
module = Some(ModuleOrUniformRoot::Module(next_module));
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_resolve/src/imports.rs
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
) {
errors.retain(|(_import, err)| match err.module {
// Skip `use` errors for `use foo::Bar;` if `foo.rs` has unrecovered parse errors.
Some(def_id) if self.mod_with_parse_errors.contains(&def_id) => false,
Some(def_id) if self.mods_with_parse_errors.contains(&def_id) => false,
_ => true,
});
if errors.is_empty() {
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_resolve/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1202,7 +1202,7 @@ pub struct Resolver<'ra, 'tcx> {
/// could be a crate that wasn't imported. For diagnostics use only.
current_crate_outer_attr_insert_span: Span,

mod_with_parse_errors: FxHashSet<DefId>,
mods_with_parse_errors: FxHashSet<DefId>,
}

/// This provides memory for the rest of the crate. The `'ra` lifetime that is
Expand Down Expand Up @@ -1548,7 +1548,7 @@ impl<'ra, 'tcx> Resolver<'ra, 'tcx> {
impl_unexpanded_invocations: Default::default(),
impl_binding_keys: Default::default(),
current_crate_outer_attr_insert_span,
mod_with_parse_errors: Default::default(),
mods_with_parse_errors: Default::default(),
};

let root_parent_scope = ParentScope::module(graph_root, &resolver);
Expand Down

0 comments on commit 8f7eff9

Please sign in to comment.