pub(crate) struct PatCtxt<'a, 'db> {
db: &'db dyn HirDatabase,
infer: &'db InferenceResult<'db>,
body: &'a Body,
pub(crate) errors: Vec<PatternError>,
}Fields§
§db: &'db dyn HirDatabase§infer: &'db InferenceResult<'db>§body: &'a Body§errors: Vec<PatternError>Implementations§
Source§impl<'a, 'db> PatCtxt<'a, 'db>
impl<'a, 'db> PatCtxt<'a, 'db>
pub(crate) fn new( db: &'db dyn HirDatabase, infer: &'db InferenceResult<'db>, body: &'a Body, ) -> Self
pub(crate) fn lower_pattern(&mut self, pat: PatId) -> Pat<'db>
fn lower_pattern_unadjusted(&mut self, pat: PatId) -> Pat<'db>
fn lower_tuple_subpats( &mut self, pats: &[PatId], expected_len: usize, ellipsis: Option<u32>, ) -> Vec<FieldPat<'db>>
fn lower_patterns(&mut self, pats: &[PatId]) -> Vec<Pat<'db>>
fn lower_opt_pattern(&mut self, pat: Option<PatId>) -> Option<Pat<'db>>
fn lower_variant_or_leaf( &mut self, pat: PatId, ty: Ty<'db>, subpatterns: Vec<FieldPat<'db>>, ) -> PatKind<'db>
fn lower_path(&mut self, pat: PatId, _path: &Path) -> Pat<'db>
fn lower_lit(&mut self, expr: ExprId) -> PatKind<'db>
Auto Trait Implementations§
impl<'a, 'db> Freeze for PatCtxt<'a, 'db>
impl<'a, 'db> !RefUnwindSafe for PatCtxt<'a, 'db>
impl<'a, 'db> !Send for PatCtxt<'a, 'db>
impl<'a, 'db> !Sync for PatCtxt<'a, 'db>
impl<'a, 'db> Unpin for PatCtxt<'a, 'db>
impl<'a, 'db> UnsafeUnpin for PatCtxt<'a, 'db>
impl<'a, 'db> !UnwindSafe for PatCtxt<'a, '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