Enum rustc_hir::hir::MatchSource[][src]

pub enum MatchSource {
    Normal,
    IfLetDesugar {
        contains_else_clause: bool,
    },
    IfLetGuardDesugar,
    WhileDesugar,
    WhileLetDesugar,
    ForLoopDesugar,
    TryDesugar,
    AwaitDesugar,
}

Hints at the original code for a match _ { .. }.

Variants

Normal

A match _ { .. }.

IfLetDesugar

An if let _ = _ { .. } (optionally with else { .. }).

Fields of IfLetDesugar

contains_else_clause: bool
IfLetGuardDesugar

An if let _ = _ => { .. } match guard.

WhileDesugar

A while _ { .. } (which was desugared to a loop { match _ { .. } }).

WhileLetDesugar

A while let _ = _ { .. } (which was desugared to a loop { match _ { .. } }).

ForLoopDesugar

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

TryDesugar

A desugared ? operator.

AwaitDesugar

A desugared <expr>.await.

Implementations

impl MatchSource[src]

pub fn name(self) -> &'static str[src]

Trait Implementations

impl Clone for MatchSource[src]

impl Copy for MatchSource[src]

impl Debug for MatchSource[src]

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

impl Eq for MatchSource[src]

impl Hash for MatchSource[src]

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

impl PartialEq<MatchSource> for MatchSource[src]

impl StructuralEq for MatchSource[src]

impl StructuralPartialEq for MatchSource[src]

Auto Trait Implementations

impl RefUnwindSafe for MatchSource

impl Send for MatchSource

impl Sync for MatchSource

impl Unpin for MatchSource

impl UnwindSafe for MatchSource

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.