pub struct AsyncHack<'a, 'tcx> { /* private fields */ }
Expand description
A hack to temporary hack to reduce spurious dependencies in generators arising from async functions.
The issue is that the &mut std::task::Context
variable interferes with both
the modular approximation and the alias analysis. As a patch up, we ignore subset
constraints arising from lifetimes appearing in the Context type, as well as ignore
any place of type Context in function calls.
See test: async_two_await
Implementations§
Auto Trait Implementations§
impl<'a, 'tcx> Freeze for AsyncHack<'a, 'tcx>
impl<'a, 'tcx> !RefUnwindSafe for AsyncHack<'a, 'tcx>
impl<'a, 'tcx> !Send for AsyncHack<'a, 'tcx>
impl<'a, 'tcx> !Sync for AsyncHack<'a, 'tcx>
impl<'a, 'tcx> Unpin for AsyncHack<'a, 'tcx>
impl<'a, 'tcx> !UnwindSafe for AsyncHack<'a, 'tcx>
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
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