]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_hir/src/definitions.rs
Auto merge of #96659 - thatzopoulos:issue-90679-fix, r=Mark-Simulacrum
[rust.git] / compiler / rustc_hir / src / definitions.rs
index c62d3b9be2fcc327aea251ee4c89b39188e43ca3..bce9ba12ac0c424045e391a05f420f714307d4f7 100644 (file)
@@ -147,6 +147,11 @@ pub(crate) fn compute_stable_hash(&self, parent: DefPathHash) -> DefPathHash {
         // DefPathHashes in this DefPathTable.
         DefPathHash::new(parent.stable_crate_id(), local_hash)
     }
+
+    #[inline]
+    pub fn get_opt_name(&self) -> Option<Symbol> {
+        self.disambiguated_data.data.get_opt_name()
+    }
 }
 
 /// A pair of `DefPathData` and an integer disambiguator. The integer is
@@ -348,11 +353,6 @@ pub fn new(stable_crate_id: StableCrateId, crate_span: Span) -> Definitions {
         }
     }
 
-    /// Retrieves the root definition.
-    pub fn get_root_def(&self) -> LocalDefId {
-        LocalDefId { local_def_index: CRATE_DEF_INDEX }
-    }
-
     /// Adds a definition with a parent definition.
     pub fn create_def(
         &mut self,