Struct StalledOnCoroutines
pub struct StalledOnCoroutines<'a, 'db> {
pub stalled_coroutines: &'a [SolverDefId],
pub cache: HashSet<Ty<'db>, FxBuildHasher>,
}Expand description
Detect if a goal is stalled on a coroutine that is owned by the current typeck root.
This function can (erroneously) fail to detect a predicate, i.e. it doesn’t need to be complete. However, this will lead to ambiguity errors, so we want to make it accurate.
This function can be also return false positives, which will lead to poor diagnostics so we want to keep this visitor precise too.
Fields§
§stalled_coroutines: &'a [SolverDefId]§cache: HashSet<Ty<'db>, FxBuildHasher>Trait Implementations§
§impl<'db> TypeVisitor<DbInterner<'db>> for StalledOnCoroutines<'_, 'db>
impl<'db> TypeVisitor<DbInterner<'db>> for StalledOnCoroutines<'_, 'db>
type Result = ControlFlow<()>
fn visit_ty( &mut self, ty: Ty<'db>, ) -> <StalledOnCoroutines<'_, 'db> as TypeVisitor<DbInterner<'db>>>::Result
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 StalledOnCoroutines<'a, 'db>
impl<'a, 'db> RefUnwindSafe for StalledOnCoroutines<'a, 'db>
impl<'a, 'db> Send for StalledOnCoroutines<'a, 'db>
impl<'a, 'db> Sync for StalledOnCoroutines<'a, 'db>
impl<'a, 'db> Unpin for StalledOnCoroutines<'a, 'db>
impl<'a, 'db> UnwindSafe for StalledOnCoroutines<'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