Rollup merge of #73254 - jyn514:local-def-id-comment, r=lcnr
Add comment about LocalDefId -> DefId Now there are instructions on how to convert back and forth on both structs, not just one. See also https://github.com/rust-lang/rust/pull/73076 r? @lcnr
This commit is contained in:
commit
85a48d07e3
1 changed files with 2 additions and 0 deletions
|
@ -133,6 +133,8 @@ impl rustc_serialize::UseSpecializedDecodable for DefIndex {}
|
|||
|
||||
/// A `DefId` identifies a particular *definition*, by combining a crate
|
||||
/// index and a def index.
|
||||
///
|
||||
/// You can create a `DefId` from a `LocalDefId` using `local_def_id.to_def_id()`.
|
||||
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Copy)]
|
||||
pub struct DefId {
|
||||
pub krate: CrateNum,
|
||||
|
|
Loading…
Reference in a new issue