Skip to content

Commit

Permalink
Rollup merge of rust-lang#80399 - jyn514:hir-id-cleanup, r=marmeladema
Browse files Browse the repository at this point in the history
Remove FIXME in rustc_privacy

rust-lang#71104 has been fixed.

r? `@marmeladema` if you have time, otherwise `@petrochenkov`
  • Loading branch information
Dylan-DPC authored Dec 28, 2020
2 parents cc579a1 + 53da233 commit 1a18fb4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions compiler/rustc_privacy/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -842,11 +842,9 @@ impl Visitor<'tcx> for EmbargoVisitor<'tcx> {
let macro_module_def_id =
ty::DefIdTree::parent(self.tcx, self.tcx.hir().local_def_id(md.hir_id).to_def_id())
.unwrap();
// FIXME(#71104) Should really be using just `as_local_hir_id` but
// some `DefId` do not seem to have a corresponding HirId.
let hir_id = macro_module_def_id
.as_local()
.and_then(|def_id| self.tcx.hir().opt_local_def_id_to_hir_id(def_id));
.map(|def_id| self.tcx.hir().local_def_id_to_hir_id(def_id));
let mut module_id = match hir_id {
Some(module_id) if self.tcx.hir().is_hir_id_module(module_id) => module_id,
// `module_id` doesn't correspond to a `mod`, return early (#63164, #65252).
Expand Down

0 comments on commit 1a18fb4

Please sign in to comment.