struct GeneratorData<'tcx, 'a>(&'a TypeckResults<'tcx>);
Tuple Fields§
§0: &'a TypeckResults<'tcx>
Implementations§
source§impl<'tcx, 'a> GeneratorData<'tcx, 'a>
impl<'tcx, 'a> GeneratorData<'tcx, 'a>
sourcefn try_get_upvar_span<F>(
&self,
infer_context: &InferCtxt<'tcx>,
generator_did: DefId,
ty_matches: F
) -> Option<GeneratorInteriorOrUpvar>where
F: Fn(Binder<'tcx, Ty<'tcx>>) -> bool,
fn try_get_upvar_span<F>( &self, infer_context: &InferCtxt<'tcx>, generator_did: DefId, ty_matches: F ) -> Option<GeneratorInteriorOrUpvar>where F: Fn(Binder<'tcx, Ty<'tcx>>) -> bool,
Try to get information about variables captured by the generator that matches a type we are
looking for with ty_matches
function. We uses it to find upvar which causes a failure to
meet an obligation
sourcefn get_from_await_ty<F>(
&self,
visitor: AwaitsVisitor,
hir: Map<'tcx>,
ty_matches: F
) -> Option<Span>where
F: Fn(Binder<'tcx, Ty<'tcx>>) -> bool,
fn get_from_await_ty<F>( &self, visitor: AwaitsVisitor, hir: Map<'tcx>, ty_matches: F ) -> Option<Span>where F: Fn(Binder<'tcx, Ty<'tcx>>) -> bool,
Try to get the span of a type being awaited on that matches the type we are looking with the
ty_matches
function. We uses it to find awaited type which causes a failure to meet an
obligation
Trait Implementations§
Auto Trait Implementations§
impl<'tcx, 'a> !RefUnwindSafe for GeneratorData<'tcx, 'a>
impl<'tcx, 'a> !Send for GeneratorData<'tcx, 'a>
impl<'tcx, 'a> !Sync for GeneratorData<'tcx, 'a>
impl<'tcx, 'a> Unpin for GeneratorData<'tcx, 'a>
impl<'tcx, 'a> !UnwindSafe for GeneratorData<'tcx, 'a>
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
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 8 bytes