pub struct MatchLowering<'a> { /* private fields */ }Expand description
Match lowering context
Implementations§
Source§impl<'a> MatchLowering<'a>
impl<'a> MatchLowering<'a>
Sourcepub fn new(func: &'a mut FunctionMIR, scrutinee_ty: Ty) -> Self
pub fn new(func: &'a mut FunctionMIR, scrutinee_ty: Ty) -> Self
Create a new match lowering context
Sourcepub fn lower_match(
&mut self,
scrutinee: Place,
arms: &[MatchArm],
result_place: Place,
join_block: BasicBlockId,
span: Span,
) -> BasicBlockId
pub fn lower_match( &mut self, scrutinee: Place, arms: &[MatchArm], result_place: Place, join_block: BasicBlockId, span: Span, ) -> BasicBlockId
Lower a match expression
Returns the entry block ID for the match
Auto Trait Implementations§
impl<'a> Freeze for MatchLowering<'a>
impl<'a> RefUnwindSafe for MatchLowering<'a>
impl<'a> Send for MatchLowering<'a>
impl<'a> Sync for MatchLowering<'a>
impl<'a> Unpin for MatchLowering<'a>
impl<'a> !UnwindSafe for MatchLowering<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more