[−][src]Struct rustc_mir::transform::simplify_try::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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.