Re-exports§
pub use crate::prelude::*;
Modules§
Structs§
- A
DefId
identifies a particular definition, by combining a crate index and a def index. - A
LocalDefId
is equivalent to aDefId
withkrate == LOCAL_CRATE
. Since we encode this information in the type, we can ensure at compile time that noDefId
s from upstream crates get thrown into the mix. There are quite a few cases where we know that onlyDefId
s from the local crate are expected; aDefId
from a different crate would signify a bug somewhere. This is whenLocalDefId
comes in handy.