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
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> WithConstness for T[src]
impl<T> WithConstness for T[src]