Struct rustc_mir_build::build::matches::Candidate [−][src]
struct Candidate<'pat, 'tcx> {
span: Span,
has_guard: bool,
match_pairs: SmallVec<[MatchPair<'pat, 'tcx>; 1]>,
bindings: Vec<Binding<'tcx>>,
ascriptions: Vec<Ascription<'tcx>>,
subcandidates: Vec<Candidate<'pat, 'tcx>>,
otherwise_block: Option<BasicBlock>,
pre_binding_block: Option<BasicBlock>,
next_candidate_pre_binding_block: Option<BasicBlock>,
}Fields
span: SpanExpand description
Span of the original pattern that gave rise to this candidate.
has_guard: boolExpand description
Whether this Candidate has a guard.
match_pairs: SmallVec<[MatchPair<'pat, 'tcx>; 1]>Expand description
All of these must be satisfied…
bindings: Vec<Binding<'tcx>>Expand description
…these bindings established…
ascriptions: Vec<Ascription<'tcx>>Expand description
…and these types asserted…
subcandidates: Vec<Candidate<'pat, 'tcx>>Expand description
…and if this is non-empty, one of these subcandidates also has to match…
otherwise_block: Option<BasicBlock>Expand description
…and the guard must be evaluated; if it’s false then branch to otherwise_block.
pre_binding_block: Option<BasicBlock>Expand description
The block before the bindings have been established.
next_candidate_pre_binding_block: Option<BasicBlock>Expand description
The pre-binding block of the next candidate.
Implementations
impl<'tcx, 'pat> Candidate<'pat, 'tcx>[src]
impl<'tcx, 'pat> Candidate<'pat, 'tcx>[src]fn new(
place: PlaceBuilder<'tcx>,
pattern: &'pat Pat<'tcx>,
has_guard: bool
) -> Self[src]
place: PlaceBuilder<'tcx>,
pattern: &'pat Pat<'tcx>,
has_guard: bool
) -> Self
fn visit_leaves<'a>(&'a mut self, visit_leaf: impl FnMut(&'a mut Self))[src]
fn visit_leaves<'a>(&'a mut self, visit_leaf: impl FnMut(&'a mut Self))[src]Visit the leaf candidates (those with no subcandidates) contained in this candidate.
Trait Implementations
Auto Trait Implementations
impl<'pat, 'tcx> !RefUnwindSafe for Candidate<'pat, 'tcx>
impl<'pat, 'tcx> !Send for Candidate<'pat, 'tcx>
impl<'pat, 'tcx> !Sync for Candidate<'pat, 'tcx>
impl<'pat, 'tcx> Unpin for Candidate<'pat, 'tcx> where
'tcx: 'pat,
'tcx: 'pat,
impl<'pat, 'tcx> !UnwindSafe for Candidate<'pat, 'tcx>
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<'a, T> Captures<'a> for T where
T: ?Sized, [src]
T: ?Sized,