[−][src]Enum rustc_hir::LocalSource

pub enum LocalSource {
    Normal,
    ForLoopDesugar,
    AsyncFn,
    AwaitDesugar,
    AssignDesugar(Span),
}

Hints at the original code for a let statement.

Variants

Normal

A match _ { .. }.

ForLoopDesugar

A desugared for _ in _ { .. } loop.

AsyncFn

When lowering async functions, we create locals within the async move so that all parameters are dropped after the future is polled.

ⓘThis example is not tested
async fn foo(<pattern> @ x: Type) {
    async move {
        let <pattern> = x;
    }
}
AwaitDesugar

A desugared <expr>.await.

AssignDesugar(Span)

A desugared expr = expr, where the LHS is a tuple, struct or array. The span is that of the = sign.

Trait Implementations

impl Clone for LocalSource[src]

impl Copy for LocalSource[src]

impl Debug for LocalSource[src]

impl<__E: Encoder> Encodable<__E> for LocalSource[src]

impl<__CTX> HashStable<__CTX> for LocalSource where
    __CTX: HashStableContext, 
[src]

Auto Trait Implementations

impl RefUnwindSafe for LocalSource

impl !Send for LocalSource

impl !Sync for LocalSource

impl Unpin for LocalSource

impl UnwindSafe for LocalSource

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized, 
[src]

impl<T> Borrow<T> for T where
    T: ?Sized, 
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone, 
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.