Trait rustc_trait_selection::traits::query::dropck_outlives::AtExt [−][src]
Required methods
fn dropck_outlives(&self, ty: Ty<'tcx>) -> InferOk<'tcx, Vec<GenericArg<'tcx>>>[src]
Implementors
impl<'cx, 'tcx> AtExt<'tcx> for At<'cx, 'tcx>[src]
fn dropck_outlives(&self, ty: Ty<'tcx>) -> InferOk<'tcx, Vec<GenericArg<'tcx>>>[src]
Given a type ty of some value being dropped, computes a set
of “kinds” (types, regions) that must be outlive the execution
of the destructor. These basically correspond to data that the
destructor might access. This is used during regionck to
impose “outlives” constraints on any lifetimes referenced
within.
The rules here are given by the “dropck” RFCs, notably #1238
and #1327. This is a fixed-point computation, where we
explore all the data that will be dropped (transitively) when
a value of type ty is dropped. For each type T that will be
dropped and which has a destructor, we must assume that all
the types/regions of T are live during the destructor, unless
they are marked with a special attribute (#[may_dangle]).