]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_hir/src/definitions.rs
Rollup merge of #82532 - pnkfelix:rustbuild-print-step-rusage, r=Mark-Simulacrum
[rust.git] / compiler / rustc_hir / src / definitions.rs
index d5ade86593e56dd9b5371fa3be1b516c2200b614..6a1b9bdbb94914f4cae548192790a71f47835411 100644 (file)
@@ -419,6 +419,10 @@ pub fn parent_module_of_macro_def(&self, expn_id: ExpnId) -> DefId {
     pub fn add_parent_module_of_macro_def(&mut self, expn_id: ExpnId, module: DefId) {
         self.parent_modules_of_macro_defs.insert(expn_id, module);
     }
+
+    pub fn iter_local_def_id(&self) -> impl Iterator<Item = LocalDefId> + '_ {
+        self.def_id_to_hir_id.iter_enumerated().map(|(k, _)| k)
+    }
 }
 
 #[derive(Copy, Clone, PartialEq, Debug)]