about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJoshua Nelson <jyn514@gmail.com>2020-12-26 19:34:10 -0500
committerJoshua Nelson <jyn514@gmail.com>2020-12-26 19:34:10 -0500
commit53da233aecbf5c6ee11596cd5be41ed3a40af9b9 (patch)
tree09c402103502c42ca6c20c1cd58b7e06b9474aac
parent3ffea60dd5a2260004cc4f487401ae7c7db1aa0e (diff)
downloadrust-53da233aecbf5c6ee11596cd5be41ed3a40af9b9.tar.gz
rust-53da233aecbf5c6ee11596cd5be41ed3a40af9b9.zip
Remove FIXME in rustc_privacy
-rw-r--r--compiler/rustc_privacy/src/lib.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_privacy/src/lib.rs b/compiler/rustc_privacy/src/lib.rs
index 3b4249a93e1..708563f2ee9 100644
--- a/compiler/rustc_privacy/src/lib.rs
+++ b/compiler/rustc_privacy/src/lib.rs
@@ -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).