[−][src]Struct rustc_mir::transform::simplify_try::SimplifyBranchSameOptimizationFinder
Fields
body: &'a Body<'tcx>tcx: TyCtxt<'tcx>Implementations
impl<'a, 'tcx> SimplifyBranchSameOptimizationFinder<'a, 'tcx>[src]
pub(in transform::simplify_try) fn find(
&self
) -> Vec<SimplifyBranchSameOptimization>[src]
&self
) -> Vec<SimplifyBranchSameOptimization>
pub(in transform::simplify_try) fn statement_equality(
&self,
adt_matched_on: Place<'tcx>,
x: &Statement<'tcx>,
x_target_and_value: &SwitchTargetAndValue,
y: &Statement<'tcx>,
y_target_and_value: &SwitchTargetAndValue
) -> StatementEquality[src]
&self,
adt_matched_on: Place<'tcx>,
x: &Statement<'tcx>,
x_target_and_value: &SwitchTargetAndValue,
y: &Statement<'tcx>,
y_target_and_value: &SwitchTargetAndValue
) -> StatementEquality
Tests if two statements can be considered equal
Statements can be trivially equal if the kinds match. But they can also be considered equal in the following case A:
discriminant(_0) = 0; // bb1 _0 = move _1; // bb2
In this case the two statements are equal iff 1: _0 is an enum where the variant index 0 is fieldless, and 2: bb1 was targeted by a switch where the discriminant of _1 was switched on
Auto Trait Implementations
impl<'a, 'tcx> !RefUnwindSafe for SimplifyBranchSameOptimizationFinder<'a, 'tcx>
impl<'a, 'tcx> !Send for SimplifyBranchSameOptimizationFinder<'a, 'tcx>
impl<'a, 'tcx> !Sync for SimplifyBranchSameOptimizationFinder<'a, 'tcx>
impl<'a, 'tcx> Unpin for SimplifyBranchSameOptimizationFinder<'a, 'tcx> where
'tcx: 'a,
'tcx: 'a,
impl<'a, 'tcx> !UnwindSafe for SimplifyBranchSameOptimizationFinder<'a, 'tcx>
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.