struct ExprValidator<'db> {
owner: DefWithBodyId,
body: &'db Body,
infer: &'db InferenceResult<'db>,
env: ParamEnv<'db>,
diagnostics: Vec<BodyValidationDiagnostic<'db>>,
validate_lints: bool,
infcx: InferCtxt<'db>,
}Fields§
§owner: DefWithBodyId§body: &'db Body§infer: &'db InferenceResult<'db>§env: ParamEnv<'db>§diagnostics: Vec<BodyValidationDiagnostic<'db>>§validate_lints: bool§infcx: InferCtxt<'db>Implementations§
Source§impl<'db> ExprValidator<'db>
impl<'db> ExprValidator<'db>
fn db(&self) -> &'db dyn HirDatabase
fn validate_body(&mut self)
fn validate_call( &mut self, call_id: ExprId, expr: &Expr, filter_map_next_checker: &mut Option<FilterMapNextChecker<'db>>, )
fn validate_match( &mut self, match_expr: ExprId, scrutinee_expr: ExprId, arms: &[MatchArm], )
fn is_known_valid_scrutinee(&self, scrutinee_expr: ExprId) -> bool
fn validate_block(&mut self, expr: &Expr)
fn check_non_exhaustive_let<'a>( &self, cx: &MatchCheckCtx<'a, 'db>, pattern_arena: &'a Arena<DeconstructedPat<MatchCheckCtx<'a, 'db>>>, pat: PatId, initializer: Option<ExprId>, ) -> Option<BodyValidationDiagnostic<'db>>
fn lower_pattern<'a>( &self, cx: &MatchCheckCtx<'a, 'db>, pat: PatId, have_errors: &mut bool, ) -> DeconstructedPat<MatchCheckCtx<'a, 'db>>
fn check_unused_must_use( &self, expr: ExprId, acc: &mut Vec<BodyValidationDiagnostic<'db>>, )
fn check_for_trailing_return(&mut self, body_expr: ExprId, body: &Body)
fn check_for_unnecessary_else(&mut self, id: ExprId, expr: &Expr)
Auto Trait Implementations§
impl<'db> !Freeze for ExprValidator<'db>
impl<'db> !RefUnwindSafe for ExprValidator<'db>
impl<'db> Send for ExprValidator<'db>
impl<'db> !Sync for ExprValidator<'db>
impl<'db> Unpin for ExprValidator<'db>
impl<'db> UnsafeUnpin for ExprValidator<'db>
impl<'db> !UnwindSafe for ExprValidator<'db>
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
§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more