Struct rustc_mir_transform::simplify_try::SimplifyBranchSameOptimizationFinder [−][src]
Fields
body: &'a Body<'tcx>tcx: TyCtxt<'tcx>Implementations
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
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
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; // bb2In this case the two statements are equal iff
_0is an enum where the variant index 0 is fieldless, and- bb1 was targeted by a switch where the discriminant of
_1was switched on
Auto Trait Implementations
impl<'a, 'tcx> !RefUnwindSafe for SimplifyBranchSameOptimizationFinder
impl<'a, 'tcx> !Send for SimplifyBranchSameOptimizationFinder
impl<'a, 'tcx> !Sync for SimplifyBranchSameOptimizationFinder
impl<'a, 'tcx> Unpin for SimplifyBranchSameOptimizationFinder where
'tcx: 'a,
impl<'a, 'tcx> !UnwindSafe for SimplifyBranchSameOptimizationFinder
Blanket Implementations
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 16 bytes
