Driveby fixes
This commit is contained in:
@@ -350,6 +350,8 @@ pub fn dtorck_constraint_for_ty_inner<'tcx>(
|
||||
// Note that we don't care about whether the resume type has any drops since this is
|
||||
// redundant; there is no storage for the resume type, so if it is actually stored
|
||||
// in the interior, we'll already detect the need for a drop by checking the interior.
|
||||
//
|
||||
// FIXME(@lcnr): Why do we erase regions in the env here? Seems odd
|
||||
let typing_env = tcx.erase_and_anonymize_regions(typing_env);
|
||||
let needs_drop = tcx.mir_coroutine_witnesses(def_id).is_some_and(|witness| {
|
||||
witness.field_tys.iter().any(|field| field.ty.needs_drop(tcx, typing_env))
|
||||
|
||||
Reference in New Issue
Block a user