rustdoc: Document that Crate is always local

This commit is contained in:
Noah Lev 2021-10-29 19:59:49 -07:00
parent 27d47d93be
commit 47b0059dba

View File

@ -113,6 +113,7 @@ impl From<DefId> for ItemId {
}
}
/// The crate currently being documented.
#[derive(Clone, Debug)]
crate struct Crate {
crate name: Symbol,
@ -142,6 +143,8 @@ crate struct ExternalCrate {
}
impl ExternalCrate {
const LOCAL: Self = Self { crate_num: LOCAL_CRATE };
#[inline]
crate fn def_id(&self) -> DefId {
DefId { krate: self.crate_num, index: CRATE_DEF_INDEX }