Skip to content

Commit 70b1a29

Browse files
authored
Rollup merge of rust-lang#80399 - jyn514:hir-id-cleanup, r=marmeladema
Remove FIXME in rustc_privacy rust-lang#71104 has been fixed. r? ``@marmeladema`` if you have time, otherwise ``@petrochenkov``
2 parents 18be436 + 53da233 commit 70b1a29

File tree

1 file changed

+1
-3
lines changed
  • compiler/rustc_privacy/src

1 file changed

+1
-3
lines changed

compiler/rustc_privacy/src/lib.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -842,11 +842,9 @@ impl Visitor<'tcx> for EmbargoVisitor<'tcx> {
842842
let macro_module_def_id =
843843
ty::DefIdTree::parent(self.tcx, self.tcx.hir().local_def_id(md.hir_id).to_def_id())
844844
.unwrap();
845-
// FIXME(#71104) Should really be using just `as_local_hir_id` but
846-
// some `DefId` do not seem to have a corresponding HirId.
847845
let hir_id = macro_module_def_id
848846
.as_local()
849-
.and_then(|def_id| self.tcx.hir().opt_local_def_id_to_hir_id(def_id));
847+
.map(|def_id| self.tcx.hir().local_def_id_to_hir_id(def_id));
850848
let mut module_id = match hir_id {
851849
Some(module_id) if self.tcx.hir().is_hir_id_module(module_id) => module_id,
852850
// `module_id` doesn't correspond to a `mod`, return early (#63164, #65252).

0 commit comments

Comments
 (0)