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>

source

fn with_let_source(&mut self, let_source: LetSource, f: impl FnOnce(&mut Self))

source

fn with_lint_level( &mut self, new_lint_level: LintLevel, f: impl FnOnce(&mut Self) )

source

fn check_patterns(&self, pat: &Pat<'tcx>, rf: RefutableFlag)

source

fn lower_pattern( &self, cx: &mut MatchCheckCtxt<'p, 'tcx>, pattern: &Pat<'tcx> ) -> &'p DeconstructedPat<'p, 'tcx>

source

fn new_cx(&self, hir_id: HirId, refutable: bool) -> MatchCheckCtxt<'p, 'tcx>

source

fn check_let( &mut self, pat: &Pat<'tcx>, scrutinee: ExprId, source: LetSource, span: Span )

source

fn check_match( &mut self, scrut: ExprId, arms: &[ArmId], source: MatchSource, expr_span: Span )

source

fn check_let_reachability( &mut self, cx: &mut MatchCheckCtxt<'p, 'tcx>, pat_id: HirId, source: LetSource, pat: &'p DeconstructedPat<'p, 'tcx>, span: Span )

source

fn check_let_chain( &mut self, let_source: LetSource, top_expr_span: Span, lhs: ExprId, rhs: ExprId )

source

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>

source§

fn thir(&self) -> &'a Thir<'tcx>

source§

fn visit_arm(&mut self, arm: &Arm<'tcx>)

source§

fn visit_expr(&mut self, ex: &Expr<'tcx>)

source§

fn visit_stmt(&mut self, stmt: &Stmt<'tcx>)

source§

fn visit_block(&mut self, block: &Block)

source§

fn visit_pat(&mut self, pat: &Pat<'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> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.

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