We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3ffea60 commit 53da233Copy full SHA for 53da233
compiler/rustc_privacy/src/lib.rs
@@ -842,11 +842,9 @@ impl Visitor<'tcx> for EmbargoVisitor<'tcx> {
842
let macro_module_def_id =
843
ty::DefIdTree::parent(self.tcx, self.tcx.hir().local_def_id(md.hir_id).to_def_id())
844
.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.
847
let hir_id = macro_module_def_id
848
.as_local()
849
- .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));
850
let mut module_id = match hir_id {
851
Some(module_id) if self.tcx.hir().is_hir_id_module(module_id) => module_id,
852
// `module_id` doesn't correspond to a `mod`, return early (#63164, #65252).
0 commit comments