Struct rustc::hir::def_id::CrateNum
[−]
pub struct 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?
Methods
impl CrateNum[src]
impl CrateNumpub fn new(x: usize) -> CrateNum[src]
pub fn new(x: usize) -> 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?
pub fn from_u32(x: u32) -> CrateNum[src]
pub fn from_u32(x: u32) -> 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?
pub fn as_usize(&self) -> usize[src]
pub fn as_usize(&self) -> usize🔬 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 as_u32(&self) -> u32[src]
pub fn as_u32(&self) -> u32🔬 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 as_def_id(&self) -> DefId[src]
pub fn as_def_id(&self) -> 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?
Trait Implementations
impl Copy for CrateNum
impl Copy for CrateNumimpl Clone for CrateNum
impl Clone for CrateNumfn clone(&self) -> CrateNum
fn clone(&self) -> CrateNumReturns 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 PartialEq for CrateNum
impl PartialEq for CrateNumfn eq(&self, __arg_0: &CrateNum) -> bool
fn eq(&self, __arg_0: &CrateNum) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &CrateNum) -> bool
fn ne(&self, __arg_0: &CrateNum) -> boolThis method tests for !=.
impl Eq for CrateNum
impl Eq for CrateNumimpl Hash for CrateNum
impl Hash for CrateNumfn hash<__H: Hasher>(&self, __arg_0: &mut __H)
fn hash<__H: Hasher>(&self, __arg_0: &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 PartialOrd for CrateNum
impl PartialOrd for CrateNumfn partial_cmp(&self, __arg_0: &CrateNum) -> Option<Ordering>
fn partial_cmp(&self, __arg_0: &CrateNum) -> Option<Ordering>This method returns an ordering between self and other values if one exists. Read more
fn lt(&self, __arg_0: &CrateNum) -> bool
fn lt(&self, __arg_0: &CrateNum) -> boolThis method tests less than (for self and other) and is used by the < operator. Read more
fn le(&self, __arg_0: &CrateNum) -> bool
fn le(&self, __arg_0: &CrateNum) -> boolThis method tests less than or equal to (for self and other) and is used by the <= operator. Read more
fn gt(&self, __arg_0: &CrateNum) -> bool
fn gt(&self, __arg_0: &CrateNum) -> boolThis method tests greater than (for self and other) and is used by the > operator. Read more
fn ge(&self, __arg_0: &CrateNum) -> bool
fn ge(&self, __arg_0: &CrateNum) -> boolThis method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
impl Ord for CrateNum
impl Ord for CrateNumfn cmp(&self, __arg_0: &CrateNum) -> Ordering
fn cmp(&self, __arg_0: &CrateNum) -> 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 Idx for CrateNum
impl Idx for CrateNumfn new(value: usize) -> Self
fn new(value: usize) -> 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 index(self) -> usize
fn index(self) -> usize🔬 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 Debug for CrateNum
impl Debug for CrateNumimpl Display for CrateNum[src]
impl Display for CrateNumfn 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 CrateNum[src]
impl UseSpecializedEncodable for CrateNumfn 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 CrateNum[src]
impl UseSpecializedDecodable for CrateNumfn 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 CrateNum[src]
impl<'a> HashStable<StableHashingContext<'a>> for CrateNumfn 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 CrateNum[src]
impl<'a> ToStableHashKey<StableHashingContext<'a>> for CrateNumtype 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 CrateNum[src]
impl Key for CrateNumfn map_crate(&self) -> CrateNum[src]
fn map_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, _: TyCtxt) -> Span[src]
fn default_span(&self, _: 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