[−][src]Struct rustc_ty_utils::needs_drop::NeedsDropTypes

pub(in needs_drop) struct NeedsDropTypes<'tcx, F> {
    tcx: TyCtxt<'tcx>,
    param_env: ParamEnv<'tcx>,
    query_ty: Ty<'tcx>,
    seen_tys: FxHashSet<Ty<'tcx>>,
    unchecked_tys: Vec<(Ty<'tcx>, usize)>,
    recursion_limit: Limit,
    adt_components: F,
}

Fields

tcx: TyCtxt<'tcx>param_env: ParamEnv<'tcx>query_ty: Ty<'tcx>seen_tys: FxHashSet<Ty<'tcx>>unchecked_tys: Vec<(Ty<'tcx>, usize)>

A stack of types left to process, and the recursion depth when we pushed that type. Each round, we pop something from the stack and check if it needs drop. If the result depends on whether some other types need drop we push them onto the stack.

recursion_limit: Limitadt_components: F

Implementations

impl<'tcx, F> NeedsDropTypes<'tcx, F>[src]

pub(in needs_drop) fn new(
    tcx: TyCtxt<'tcx>,
    param_env: ParamEnv<'tcx>,
    ty: Ty<'tcx>,
    adt_components: F
) -> Self
[src]

Trait Implementations

impl<'tcx, F, I> Iterator for NeedsDropTypes<'tcx, F> where
    F: Fn(&AdtDef) -> Result<I, AlwaysRequiresDrop>,
    I: Iterator<Item = Ty<'tcx>>, 
[src]

type Item = Result<Ty<'tcx>, AlwaysRequiresDrop>

The type of the elements being iterated over.

Auto Trait Implementations

impl<'tcx, F> !RefUnwindSafe for NeedsDropTypes<'tcx, F>

impl<'tcx, F> !Send for NeedsDropTypes<'tcx, F>

impl<'tcx, F> !Sync for NeedsDropTypes<'tcx, F>

impl<'tcx, F> Unpin for NeedsDropTypes<'tcx, F> where
    F: Unpin, 

impl<'tcx, F> !UnwindSafe for NeedsDropTypes<'tcx, F>

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<T> From<T> for T[src]

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

impl<I> IntoIterator for I where
    I: Iterator, 
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

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]