Struct rustc_mir::transform::simplify_try::SimplifyArmIdentity [−][src]
pub struct SimplifyArmIdentity;
Expand description
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
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> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> WithConstness for T[src]
impl<T> WithConstness for T[src]