提交 47b0059d 编写于 作者: N Noah Lev

rustdoc: Document that `Crate` is always local

上级 27d47d93
......@@ -113,6 +113,7 @@ fn from(id: DefId) -> Self {
}
}
/// The crate currently being documented.
#[derive(Clone, Debug)]
crate struct Crate {
crate name: Symbol,
......@@ -142,6 +143,8 @@ fn from(id: DefId) -> Self {
}
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 }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册