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 EarlyOtherwiseBranchimpl Send for EarlyOtherwiseBranchimpl Sync for EarlyOtherwiseBranchimpl Unpin for EarlyOtherwiseBranchimpl UnwindSafe for EarlyOtherwiseBranchBlanket Implementations
Layout
Note: Most layout information is completely unstable and may be different between compiler versions and platforms. 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