rustc_hir::hir

Type Alias Lit

Source
pub type Lit = Spanned<LitKind>;
Expand description

A literal.

Aliased Type§

struct Lit {
    pub node: LitKind,
    pub span: Span,
}

Fields§

§node: LitKind§span: Span

Trait Implementations§

Source§

impl<'tcx> ArenaAllocatable<'tcx> for Lit

Source§

fn allocate_on(self, arena: &'tcx Arena<'tcx>) -> &'tcx mut Self

Source§

fn allocate_from_iter( arena: &'tcx Arena<'tcx>, iter: impl IntoIterator<Item = Self>, ) -> &'tcx mut [Self]

Source§

impl<T> Clone for Spanned<T>
where T: Clone,

Source§

fn clone(&self) -> Spanned<T>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T> Debug for Spanned<T>
where T: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<T, __D> Decodable<__D> for Spanned<T>
where __D: SpanDecoder, T: Decodable<__D>,

Source§

fn decode(__decoder: &mut __D) -> Spanned<T>

Source§

impl<T, __E> Encodable<__E> for Spanned<T>
where __E: SpanEncoder, T: Encodable<__E>,

Source§

fn encode(&self, __encoder: &mut __E)

Source§

impl<T> Hash for Spanned<T>
where T: Hash,

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<T, __CTX> HashStable<__CTX> for Spanned<T>
where __CTX: HashStableContext, T: HashStable<__CTX>,

Source§

fn hash_stable( &self, __hcx: &mut __CTX, __hasher: &mut StableHasher<SipHasher128>, )

Source§

impl<T> PartialEq for Spanned<T>
where T: PartialEq,

Source§

fn eq(&self, other: &Spanned<T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T> Copy for Spanned<T>
where T: Copy,

Source§

impl<T> StructuralPartialEq for Spanned<T>

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 32 bytes