From 5271e98f4e8cf2e74e9b01fc2494ea9e90b08194 Mon Sep 17 00:00:00 2001 From: Joshua Nelson Date: Sat, 6 Jun 2020 17:19:21 -0400 Subject: [PATCH] Use get_module instead of `module_map` for `resolve_str_path_error` --- src/librustc_resolve/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librustc_resolve/lib.rs b/src/librustc_resolve/lib.rs index c3686ca4899..0f2559e4b19 100644 --- a/src/librustc_resolve/lib.rs +++ b/src/librustc_resolve/lib.rs @@ -2998,7 +2998,7 @@ impl<'a> Resolver<'a> { .collect(), } }; - let module = self.module_map.get(&module_id).copied().unwrap_or(self.graph_root); + let module = self.get_module(module_id.to_def_id()); let parent_scope = &ParentScope::module(module); let res = self.resolve_ast_path(&path, ns, parent_scope).map_err(|_| ())?; Ok((path, res))