struct UninhabitedFrom<'a, 'db> {
target_mod: ModuleId,
recursive_ty: FxHashSet<Ty<'db>>,
max_depth: usize,
infcx: &'a InferCtxt<'db>,
env: ParamEnv<'db>,
}Fields§
§target_mod: ModuleId§recursive_ty: FxHashSet<Ty<'db>>§max_depth: usize§infcx: &'a InferCtxt<'db>§env: ParamEnv<'db>Implementations§
Source§impl<'a, 'db> UninhabitedFrom<'a, 'db>
impl<'a, 'db> UninhabitedFrom<'a, 'db>
fn new( infcx: &'a InferCtxt<'db>, target_mod: ModuleId, env: ParamEnv<'db>, ) -> Self
fn interner(&self) -> DbInterner<'db>
fn db(&self) -> &'db dyn HirDatabase
fn visit_adt( &mut self, adt: AdtId, subst: GenericArgs<'db>, ) -> ControlFlow<VisiblyUninhabited>
fn visit_variant( &mut self, variant: VariantId, subst: GenericArgs<'db>, ) -> ControlFlow<VisiblyUninhabited>
fn visit_field( &mut self, vis: Option<Visibility>, ty: &EarlyBinder<'db, Ty<'db>>, subst: GenericArgs<'db>, ) -> ControlFlow<VisiblyUninhabited>
Trait Implementations§
Source§impl<'db> TypeVisitor<DbInterner<'db>> for UninhabitedFrom<'_, 'db>
impl<'db> TypeVisitor<DbInterner<'db>> for UninhabitedFrom<'_, 'db>
type Result = ControlFlow<VisiblyUninhabited>
fn visit_ty(&mut self, ty: Ty<'db>) -> ControlFlow<VisiblyUninhabited>
fn visit_binder<T>(&mut self, t: &Binder<I, T>) -> Self::Resultwhere
T: TypeVisitable<I>,
fn visit_region(&mut self, r: <I as Interner>::Region) -> Self::Result
fn visit_const(&mut self, c: <I as Interner>::Const) -> Self::Result
fn visit_predicate(&mut self, p: <I as Interner>::Predicate) -> Self::Result
fn visit_clauses(&mut self, c: <I as Interner>::Clauses) -> Self::Result
fn visit_error( &mut self, _guar: <I as Interner>::ErrorGuaranteed, ) -> Self::Result
Auto Trait Implementations§
impl<'a, 'db> Freeze for UninhabitedFrom<'a, 'db>
impl<'a, 'db> !RefUnwindSafe for UninhabitedFrom<'a, 'db>
impl<'a, 'db> !Send for UninhabitedFrom<'a, 'db>
impl<'a, 'db> !Sync for UninhabitedFrom<'a, 'db>
impl<'a, 'db> Unpin for UninhabitedFrom<'a, 'db>
impl<'a, 'db> UnsafeUnpin for UninhabitedFrom<'a, 'db>
impl<'a, 'db> !UnwindSafe for UninhabitedFrom<'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