[−][src]Trait rustc_trait_selection::traits::query::dropck_outlives::AtExt
Required methods
pub fn dropck_outlives(
&self,
ty: Ty<'tcx>
) -> InferOk<'tcx, Vec<GenericArg<'tcx>>>[src]
&self,
ty: Ty<'tcx>
) -> InferOk<'tcx, Vec<GenericArg<'tcx>>>
Implementors
impl<'cx, 'tcx> AtExt<'tcx> for At<'cx, 'tcx>[src]
pub fn dropck_outlives(
&self,
ty: Ty<'tcx>
) -> InferOk<'tcx, Vec<GenericArg<'tcx>>>[src]
&self,
ty: Ty<'tcx>
) -> InferOk<'tcx, Vec<GenericArg<'tcx>>>
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]).