Struct rustc::ty::UpvarId
[−]
[src]
pub struct UpvarId {
pub var_id: HirId,
pub closure_expr_id: 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?
Upvars do not get their own node-id. Instead, we use the pair of the original var id (that is, the root variable that is referenced by the upvar) and the id of the closure expression.
Fields
var_id: HirId
🔬 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?
closure_expr_id: 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, 'tcx> HashStable<StableHashingContext<'a>> for UpvarId[src]
impl<'a, 'tcx> HashStable<StableHashingContext<'a>> for UpvarIdfn hash_stable<W: StableHasherResult>(
&self,
__ctx: &mut StableHashingContext<'a>,
__hasher: &mut StableHasher<W>
)[src]
fn hash_stable<W: StableHasherResult>(
&self,
__ctx: &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 Clone for UpvarId[src]
impl Clone for UpvarIdfn clone(&self) -> UpvarId[src]
fn clone(&self) -> UpvarIdReturns 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 Copy for UpvarId[src]
impl Copy for UpvarIdimpl PartialEq for UpvarId[src]
impl PartialEq for UpvarIdfn eq(&self, __arg_0: &UpvarId) -> bool[src]
fn eq(&self, __arg_0: &UpvarId) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &UpvarId) -> bool[src]
fn ne(&self, __arg_0: &UpvarId) -> boolThis method tests for !=.
impl Eq for UpvarId[src]
impl Eq for UpvarIdimpl Hash for UpvarId[src]
impl Hash for UpvarIdfn hash<__H: Hasher>(&self, __arg_0: &mut __H)[src]
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 Encodable for UpvarId[src]
impl Encodable for UpvarIdfn encode<__S: Encoder>(&self, __arg_0: &mut __S) -> Result<(), __S::Error>[src]
fn encode<__S: Encoder>(&self, __arg_0: &mut __S) -> Result<(), __S::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?
impl Decodable for UpvarId[src]
impl Decodable for UpvarIdfn decode<__D: Decoder>(__arg_0: &mut __D) -> Result<UpvarId, __D::Error>[src]
fn decode<__D: Decoder>(__arg_0: &mut __D) -> Result<UpvarId, __D::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?
impl Debug for UpvarId[src]
impl Debug for UpvarId