struct SimplifyBranchSameOptimizationFinder<'a, 'tcx> {
    body: &'a Body<'tcx>,
    tcx: TyCtxt<'tcx>,
}

Fields§

§body: &'a Body<'tcx>§tcx: TyCtxt<'tcx>

Implementations§

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

  • _0 is an enum where the variant index 0 is fieldless, and
  • bb1 was targeted by a switch where the discriminant of _1 was switched on

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.

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