dropck_outlives comments
This commit is contained in:
parent
c0156d1120
commit
84043589a6
@ -161,8 +161,16 @@ impl<'me, 'typeck, 'flow, 'tcx> LivenessResults<'me, 'typeck, 'flow, 'tcx> {
|
||||
}
|
||||
}
|
||||
|
||||
// Runs dropck for locals whose liveness isn't relevant. This is
|
||||
// necessary to eagerly detect unbound recursion during drop glue computation.
|
||||
/// Runs dropck for locals whose liveness isn't relevant. This is
|
||||
/// necessary to eagerly detect unbound recursion during drop glue computation.
|
||||
///
|
||||
/// These locals should not result in any liveness constraints given that they
|
||||
/// should otherwise not be considered boring and get dropped. This is currently
|
||||
/// not the case due to mismatches between `Ty::needs_drop` and `compute_drop_data`.
|
||||
/// See #110288 and RFC 3417 for more details.
|
||||
///
|
||||
/// FIXME: Assert that the returned liveness constraints are empty once these
|
||||
/// inconsistencies are fixed.
|
||||
fn dropck_boring_locals(&mut self, boring_locals: Vec<Local>) {
|
||||
for local in boring_locals {
|
||||
let local_ty = self.cx.body.local_decls[local].ty;
|
||||
|
@ -31,16 +31,6 @@ impl<'tcx> super::QueryTypeOp<'tcx> for DropckOutlives<'tcx> {
|
||||
tcx: TyCtxt<'tcx>,
|
||||
canonicalized: Canonical<'tcx, ParamEnvAnd<'tcx, Self>>,
|
||||
) -> Result<CanonicalQueryResponse<'tcx, Self::QueryResponse>, NoSolution> {
|
||||
// Subtle: note that we are not invoking
|
||||
// `infcx.at(...).dropck_outlives(...)` here, but rather the
|
||||
// underlying `dropck_outlives` query. This same underlying
|
||||
// query is also used by the
|
||||
// `infcx.at(...).dropck_outlives(...)` fn. Avoiding the
|
||||
// wrapper means we don't need an infcx in this code, which is
|
||||
// good because the interface doesn't give us one (so that we
|
||||
// know we are not registering any subregion relations or
|
||||
// other things).
|
||||
|
||||
// FIXME convert to the type expected by the `dropck_outlives`
|
||||
// query. This should eventually be fixed by changing the
|
||||
// *underlying query*.
|
||||
|
Loading…
x
Reference in New Issue
Block a user