Skip to content

Commit

Permalink
librustc_resolve: fixup nit in previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
marmeladema committed Apr 8, 2020
1 parent 59e0db6 commit 6ae3888
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/librustc_resolve/build_reduced_graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use rustc_errors::{struct_span_err, Applicability};
use rustc_expand::base::SyntaxExtension;
use rustc_expand::expand::AstFragment;
use rustc_hir::def::{self, *};
use rustc_hir::def_id::{DefId, CRATE_DEF_INDEX, LOCAL_CRATE};
use rustc_hir::def_id::{DefId, CRATE_DEF_INDEX};
use rustc_metadata::creader::LoadedMacro;
use rustc_middle::bug;
use rustc_middle::hir::exports::Export;
Expand Down Expand Up @@ -96,8 +96,8 @@ impl<'a> Resolver<'a> {
}

crate fn get_module(&mut self, def_id: DefId) -> Module<'a> {
if def_id.krate == LOCAL_CRATE {
return self.module_map[&def_id.as_local().unwrap()];
if let Some(def_id) = def_id.as_local() {
return self.module_map[&def_id];
}

if let Some(&module) = self.extern_module_map.get(&def_id) {
Expand Down

0 comments on commit 6ae3888

Please sign in to comment.