Struct flowistry_pdg::rustc::def_id::LocalDefId
source · pub struct LocalDefId {
pub local_def_index: DefIndex,
}
Expand description
A LocalDefId
is equivalent to a DefId
with krate == LOCAL_CRATE
. Since
we encode this information in the type, we can ensure at compile time that
no DefId
s from upstream crates get thrown into the mix. There are quite a
few cases where we know that only DefId
s from the local crate are expected;
a DefId
from a different crate would signify a bug somewhere. This
is when LocalDefId
comes in handy.
Fields§
§local_def_index: DefIndex
Auto Trait Implementations§
impl RefUnwindSafe for LocalDefId
impl Send for LocalDefId
impl Sync for LocalDefId
impl Unpin for LocalDefId
impl UnwindSafe for LocalDefId
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more