Struct rustc_mir_build::thir::pattern::check_match::MatchVisitor
source · struct MatchVisitor<'a, 'p, 'tcx> {
tcx: TyCtxt<'tcx>,
param_env: ParamEnv<'tcx>,
thir: &'a Thir<'tcx>,
lint_level: HirId,
let_source: LetSource,
pattern_arena: &'p TypedArena<DeconstructedPat<'p, 'tcx>>,
error: Result<(), ErrorGuaranteed>,
}
Fields§
§tcx: TyCtxt<'tcx>
§param_env: ParamEnv<'tcx>
§thir: &'a Thir<'tcx>
§lint_level: HirId
§let_source: LetSource
§pattern_arena: &'p TypedArena<DeconstructedPat<'p, 'tcx>>
§error: Result<(), ErrorGuaranteed>
Implementations§
source§impl<'p, 'tcx> MatchVisitor<'_, 'p, 'tcx>
impl<'p, 'tcx> MatchVisitor<'_, 'p, 'tcx>
fn with_let_source(&mut self, let_source: LetSource, f: impl FnOnce(&mut Self))
fn with_lint_level( &mut self, new_lint_level: LintLevel, f: impl FnOnce(&mut Self) )
fn check_patterns(&self, pat: &Pat<'tcx>, rf: RefutableFlag)
fn lower_pattern( &self, cx: &mut MatchCheckCtxt<'p, 'tcx>, pattern: &Pat<'tcx> ) -> &'p DeconstructedPat<'p, 'tcx>
fn new_cx(&self, hir_id: HirId, refutable: bool) -> MatchCheckCtxt<'p, 'tcx>
fn check_let( &mut self, pat: &Pat<'tcx>, scrutinee: ExprId, source: LetSource, span: Span )
fn check_match( &mut self, scrut: ExprId, arms: &[ArmId], source: MatchSource, expr_span: Span )
fn check_let_reachability( &mut self, cx: &mut MatchCheckCtxt<'p, 'tcx>, pat_id: HirId, source: LetSource, pat: &'p DeconstructedPat<'p, 'tcx>, span: Span )
fn check_let_chain( &mut self, let_source: LetSource, top_expr_span: Span, lhs: ExprId, rhs: ExprId )
fn check_irrefutable(&mut self, pat: &Pat<'tcx>, origin: &str, sp: Option<Span>)
Trait Implementations§
source§impl<'a, 'tcx> Visitor<'a, 'tcx> for MatchVisitor<'a, '_, 'tcx>
impl<'a, 'tcx> Visitor<'a, 'tcx> for MatchVisitor<'a, '_, 'tcx>
Auto Trait Implementations§
impl<'a, 'p, 'tcx> !RefUnwindSafe for MatchVisitor<'a, 'p, 'tcx>
impl<'a, 'p, 'tcx> !Send for MatchVisitor<'a, 'p, 'tcx>
impl<'a, 'p, 'tcx> !Sync for MatchVisitor<'a, 'p, 'tcx>
impl<'a, 'p, 'tcx> Unpin for MatchVisitor<'a, 'p, 'tcx>
impl<'a, 'p, 'tcx> !UnwindSafe for MatchVisitor<'a, 'p, 'tcx>
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
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: 48 bytes