Struct rustc_mir_transform::early_otherwise_branch::EarlyOtherwiseBranch [−][src]
pub struct EarlyOtherwiseBranch;
Expand description
This pass optimizes something like
let x: Option<()>;
let y: Option<()>;
match (x,y) {
(Some(_), Some(_)) => {0},
_ => {1}
}
into something like
let x: Option<()>;
let y: Option<()>;
let discriminant_x = // get discriminant of x
let discriminant_y = // get discriminant of y
if discriminant_x != discriminant_y || discriminant_x == None {1} else {0}
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for EarlyOtherwiseBranch
impl Send for EarlyOtherwiseBranch
impl Sync for EarlyOtherwiseBranch
impl Unpin for EarlyOtherwiseBranch
impl UnwindSafe for EarlyOtherwiseBranch
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: 0 bytes