Struct rustc::hir::def_id::DefId [−][src]
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
A DefId identifies a particular definition, by combining a crate index and a def index.
Fields
krate: CrateNum
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
index: DefIndex
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Methods
impl DefId[src]
impl DefIdpub fn to_dep_node(self, tcx: TyCtxt, kind: DepKind) -> DepNode[src]
pub fn to_dep_node(self, tcx: TyCtxt, kind: DepKind) -> DepNode🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
impl DefId[src]
impl DefIdpub fn local(index: DefIndex) -> DefId[src]
pub fn local(index: DefIndex) -> DefId🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Make a local DefId with the given index.
pub fn is_local(self) -> bool[src]
pub fn is_local(self) -> bool🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
pub fn to_local(self) -> LocalDefId[src]
pub fn to_local(self) -> LocalDefId🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Trait Implementations
impl<'a, 'gcx: 'tcx + 'a, 'tcx: 'a> DepNodeParams<'a, 'gcx, 'tcx> for DefId[src]
impl<'a, 'gcx: 'tcx + 'a, 'tcx: 'a> DepNodeParams<'a, 'gcx, 'tcx> for DefIdconst CAN_RECONSTRUCT_QUERY_KEY: bool
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
CAN_RECONSTRUCT_QUERY_KEY: bool = true
fn to_fingerprint(&self, tcx: TyCtxt) -> Fingerprint[src]
fn to_fingerprint(&self, tcx: TyCtxt) -> Fingerprint🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
This method turns the parameters of a DepNodeConstructor into an opaque Fingerprint to be used in DepNode. Not all DepNodeParams support being turned into a Fingerprint (they don't need to if the corresponding DepNode is anonymous). Read more
fn to_debug_str(&self, tcx: TyCtxt<'a, 'gcx, 'tcx>) -> String[src]
fn to_debug_str(&self, tcx: TyCtxt<'a, 'gcx, 'tcx>) -> String🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
impl DepGraphSafe for DefId[src]
impl DepGraphSafe for DefIdA DefId on its own doesn't give access to any particular state.
You must fetch the state from the various maps or generate
on-demand queries, all of which create reads.
impl Clone for DefId[src]
impl Clone for DefIdfn clone(&self) -> DefId[src]
fn clone(&self) -> DefIdReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl Eq for DefId[src]
impl Eq for DefIdfn assert_receiver_is_total_eq(&self)[src]
fn assert_receiver_is_total_eq(&self)impl Ord for DefId[src]
impl Ord for DefIdfn cmp(&self, other: &DefId) -> Ordering[src]
fn cmp(&self, other: &DefId) -> OrderingThis method returns an Ordering between self and other. Read more
fn max(self, other: Self) -> Self1.21.0[src]
fn max(self, other: Self) -> SelfCompares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self1.21.0[src]
fn min(self, other: Self) -> SelfCompares and returns the minimum of two values. Read more
impl PartialOrd for DefId[src]
impl PartialOrd for DefIdfn partial_cmp(&self, other: &DefId) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &DefId) -> Option<Ordering>This method returns an ordering between self and other values if one exists. Read more
fn lt(&self, other: &DefId) -> bool[src]
fn lt(&self, other: &DefId) -> boolThis method tests less than (for self and other) and is used by the < operator. Read more
fn le(&self, other: &DefId) -> bool[src]
fn le(&self, other: &DefId) -> boolThis method tests less than or equal to (for self and other) and is used by the <= operator. Read more
fn gt(&self, other: &DefId) -> bool[src]
fn gt(&self, other: &DefId) -> boolThis method tests greater than (for self and other) and is used by the > operator. Read more
fn ge(&self, other: &DefId) -> bool[src]
fn ge(&self, other: &DefId) -> boolThis method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
impl PartialEq for DefId[src]
impl PartialEq for DefIdfn eq(&self, other: &DefId) -> bool[src]
fn eq(&self, other: &DefId) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &DefId) -> bool[src]
fn ne(&self, other: &DefId) -> boolThis method tests for !=.
impl Hash for DefId[src]
impl Hash for DefIdfn hash<__H: Hasher>(&self, state: &mut __H)[src]
fn hash<__H: Hasher>(&self, state: &mut __H)Feeds this value into the given [Hasher]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, Feeds a slice of this type into the given [Hasher]. Read more
impl Copy for DefId[src]
impl Copy for DefIdimpl Debug for DefId[src]
impl Debug for DefIdfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl UseSpecializedEncodable for DefId[src]
impl UseSpecializedEncodable for DefIdfn default_encode<E>(&self, &mut E) -> Result<(), <E as Encoder>::Error> where
E: Encoder, [src]
fn default_encode<E>(&self, &mut E) -> Result<(), <E as Encoder>::Error> where
E: Encoder, 🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Defaults to returning an error (see SpecializationError).
impl UseSpecializedDecodable for DefId[src]
impl UseSpecializedDecodable for DefIdfn default_decode<D>(&mut D) -> Result<Self, <D as Decoder>::Error> where
D: Decoder, [src]
fn default_decode<D>(&mut D) -> Result<Self, <D as Decoder>::Error> where
D: Decoder, 🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Defaults to returning an error (see SpecializationError).
impl<'a> HashStable<StableHashingContext<'a>> for DefId[src]
impl<'a> HashStable<StableHashingContext<'a>> for DefIdfn hash_stable<W: StableHasherResult>(
&self,
hcx: &mut StableHashingContext<'a>,
hasher: &mut StableHasher<W>
)[src]
fn hash_stable<W: StableHasherResult>(
&self,
hcx: &mut StableHashingContext<'a>,
hasher: &mut StableHasher<W>
)🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
impl<'a> ToStableHashKey<StableHashingContext<'a>> for DefId[src]
impl<'a> ToStableHashKey<StableHashingContext<'a>> for DefIdtype KeyType = DefPathHash
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn to_stable_hash_key(&self, hcx: &StableHashingContext<'a>) -> DefPathHash[src]
fn to_stable_hash_key(&self, hcx: &StableHashingContext<'a>) -> DefPathHash🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
impl Key for DefId[src]
impl Key for DefIdfn query_crate(&self) -> CrateNum[src]
fn query_crate(&self) -> CrateNum🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Given an instance of this key, what crate is it referring to? This is used to find the provider. Read more
fn default_span(&self, tcx: TyCtxt) -> Span[src]
fn default_span(&self, tcx: TyCtxt) -> Span🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
In the event that a cycle occurs, if no explicit span has been given for a query with key self, what span should we use? Read more
impl<'a, 'tcx, 'x> SpecializedDecoder<DefId> for CacheDecoder<'a, 'tcx, 'x>[src]
impl<'a, 'tcx, 'x> SpecializedDecoder<DefId> for CacheDecoder<'a, 'tcx, 'x>fn specialized_decode(&mut self) -> Result<DefId, Self::Error>[src]
fn specialized_decode(&mut self) -> Result<DefId, Self::Error>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Decode a value in a manner specific to this decoder state.
impl<'enc, 'a, 'tcx, E> SpecializedEncoder<DefId> for CacheEncoder<'enc, 'a, 'tcx, E> where
E: 'enc + TyEncoder, [src]
impl<'enc, 'a, 'tcx, E> SpecializedEncoder<DefId> for CacheEncoder<'enc, 'a, 'tcx, E> where
E: 'enc + TyEncoder, fn specialized_encode(&mut self, id: &DefId) -> Result<(), Self::Error>[src]
fn specialized_encode(&mut self, id: &DefId) -> Result<(), Self::Error>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Encode the value in a manner specific to this encoder state.
impl<'tcx> TypeFoldable<'tcx> for DefId[src]
impl<'tcx> TypeFoldable<'tcx> for DefIdfn super_fold_with<'gcx: 'tcx, F: TypeFolder<'gcx, 'tcx>>(
&self,
_: &mut F
) -> DefId[src]
fn super_fold_with<'gcx: 'tcx, F: TypeFolder<'gcx, 'tcx>>(
&self,
_: &mut F
) -> DefId🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn super_visit_with<F: TypeVisitor<'tcx>>(&self, _: &mut F) -> bool[src]
fn super_visit_with<F: TypeVisitor<'tcx>>(&self, _: &mut F) -> bool🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn fold_with<'gcx: 'tcx, F: TypeFolder<'gcx, 'tcx>>(
&self,
folder: &mut F
) -> Self[src]
fn fold_with<'gcx: 'tcx, F: TypeFolder<'gcx, 'tcx>>(
&self,
folder: &mut F
) -> Self🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> bool[src]
fn visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> bool🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn has_regions_bound_at_or_above(&self, binder: DebruijnIndex) -> bool[src]
fn has_regions_bound_at_or_above(&self, binder: DebruijnIndex) -> bool🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
True if self has any late-bound regions that are either bound by binder or bound by some binder outside of binder. If binder is ty::INNERMOST, this indicates whether there are any late-bound regions that appear free. Read more
fn has_regions_bound_above(&self, binder: DebruijnIndex) -> bool[src]
fn has_regions_bound_above(&self, binder: DebruijnIndex) -> bool🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
True if this self has any regions that escape binder (and hence are not bound by it). Read more
fn has_escaping_regions(&self) -> bool[src]
fn has_escaping_regions(&self) -> bool🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn has_type_flags(&self, flags: TypeFlags) -> bool[src]
fn has_type_flags(&self, flags: TypeFlags) -> bool🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn has_projections(&self) -> bool[src]
fn has_projections(&self) -> bool🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn references_error(&self) -> bool[src]
fn references_error(&self) -> bool🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn has_param_types(&self) -> bool[src]
fn has_param_types(&self) -> bool🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn has_self_ty(&self) -> bool[src]
fn has_self_ty(&self) -> bool🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn has_infer_types(&self) -> bool[src]
fn has_infer_types(&self) -> bool🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn needs_infer(&self) -> bool[src]
fn needs_infer(&self) -> bool🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn has_skol(&self) -> bool[src]
fn has_skol(&self) -> bool🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn needs_subst(&self) -> bool[src]
fn needs_subst(&self) -> bool🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn has_re_skol(&self) -> bool[src]
fn has_re_skol(&self) -> bool🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn has_closure_types(&self) -> bool[src]
fn has_closure_types(&self) -> bool🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn has_free_regions(&self) -> bool[src]
fn has_free_regions(&self) -> bool🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
"Free" regions in this context means that it has any region that is not (a) erased or (b) late-bound. Read more
fn has_erasable_regions(&self) -> bool[src]
fn has_erasable_regions(&self) -> bool🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
True if there any any un-erased free regions.
fn is_global(&self) -> bool[src]
fn is_global(&self) -> bool🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Indicates whether this value references only 'global' types/lifetimes that are the same regardless of what fn we are in. This is used for caching. Read more
fn has_late_bound_regions(&self) -> bool[src]
fn has_late_bound_regions(&self) -> bool🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
True if there are any late-bound regions
impl<'tcx> Lift<'tcx> for DefId[src]
impl<'tcx> Lift<'tcx> for DefIdtype Lifted = Self
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn lift_to_tcx<'a, 'gcx>(&self, _: TyCtxt<'a, 'gcx, 'tcx>) -> Option<Self>[src]
fn lift_to_tcx<'a, 'gcx>(&self, _: TyCtxt<'a, 'gcx, 'tcx>) -> Option<Self>🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?