[][src]Struct rustc_mir::transform::simplify_try::SimplifyArmIdentity

pub struct SimplifyArmIdentity;

Simplifies arms of form Variant(x) => Variant(x) to just a move.

This is done by transforming basic blocks where the statements match:

_LOCAL_TMP = ((_LOCAL_1 as Variant ).FIELD: TY );
_TMP_2 = _LOCAL_TMP;
((_LOCAL_0 as Variant).FIELD: TY) = move _TMP_2;
discriminant(_LOCAL_0) = VAR_IDX;

into:

_LOCAL_0 = move _LOCAL_1

Trait Implementations

impl<'tcx> MirPass<'tcx> for SimplifyArmIdentity[src]

Auto Trait Implementations

impl RefUnwindSafe for SimplifyArmIdentity

impl Send for SimplifyArmIdentity

impl Sync for SimplifyArmIdentity

impl Unpin for SimplifyArmIdentity

impl UnwindSafe for SimplifyArmIdentity

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, 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.

impl<T> WithConstness for T[src]