[−][src]Struct rustc_typeck::check::generator_interior::InteriorVisitor

pub(in check::generator_interior) struct InteriorVisitor<'a, 'tcx> {
    fcx: &'a FnCtxt<'a, 'tcx>,
    types: FxIndexSet<GeneratorInteriorTypeCause<'tcx>>,
    region_scope_tree: &'tcx ScopeTree,
    expr_count: usize,
    kind: GeneratorKind,
    prev_unresolved_span: Option<Span>,
    guard_bindings: SmallVec<[SmallVec<[HirId; 4]>; 1]>,
    guard_bindings_set: HirIdSet,
}

Fields

fcx: &'a FnCtxt<'a, 'tcx>types: FxIndexSet<GeneratorInteriorTypeCause<'tcx>>region_scope_tree: &'tcx ScopeTreeexpr_count: usizekind: GeneratorKindprev_unresolved_span: Option<Span>guard_bindings: SmallVec<[SmallVec<[HirId; 4]>; 1]>

Match arm guards have temporary borrows from the pattern bindings. In case there is a yield point in a guard with a reference to such bindings, such borrows can span across this yield point. As such, we need to track these borrows and record them despite of the fact that they may succeed the said yield point in the post-order.

guard_bindings_set: HirIdSet

Implementations

impl<'a, 'tcx> InteriorVisitor<'a, 'tcx>[src]

pub(in check::generator_interior) fn record(
    &mut self,
    ty: Ty<'tcx>,
    scope: Option<Scope>,
    expr: Option<&'tcx Expr<'tcx>>,
    source_span: Span,
    guard_borrowing_from_pattern: bool
)
[src]

Trait Implementations

impl<'a, 'tcx> Visitor<'tcx> for InteriorVisitor<'a, 'tcx>[src]

type Map = ErasedMap<'tcx>

Auto Trait Implementations

impl<'a, 'tcx> !RefUnwindSafe for InteriorVisitor<'a, 'tcx>

impl<'a, 'tcx> !Send for InteriorVisitor<'a, 'tcx>

impl<'a, 'tcx> !Sync for InteriorVisitor<'a, 'tcx>

impl<'a, 'tcx> Unpin for InteriorVisitor<'a, 'tcx> where
    'tcx: 'a, 

impl<'a, 'tcx> !UnwindSafe for InteriorVisitor<'a, 'tcx>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized, 
[src]

impl<T> Borrow<T> for T where
    T: ?Sized, 
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized, 
[src]

impl<'a, T> Captures<'a> for T where
    T: ?Sized, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> WithConstness for T[src]