Skip to content

Commit 286502c

Browse files
committed
Enable drop_tracking_mir by default.
1 parent a626caa commit 286502c

File tree

29 files changed

+114
-2513
lines changed

29 files changed

+114
-2513
lines changed

compiler/rustc_hir_analysis/src/check/check.rs

+1-8
Original file line numberDiff line numberDiff line change
@@ -1579,13 +1579,7 @@ fn opaque_type_cycle_error(
15791579
label_match(capture.place.ty(), capture.get_path_span(tcx));
15801580
}
15811581
// Label any generator locals that capture the opaque
1582-
for interior_ty in
1583-
typeck_results.generator_interior_types.as_ref().skip_binder()
1584-
{
1585-
label_match(interior_ty.ty, interior_ty.span);
1586-
}
1587-
if tcx.sess.opts.unstable_opts.drop_tracking_mir
1588-
&& let DefKind::Generator = tcx.def_kind(closure_def_id)
1582+
if let DefKind::Generator = tcx.def_kind(closure_def_id)
15891583
&& let Some(generator_layout) = tcx.mir_generator_witnesses(closure_def_id)
15901584
{
15911585
for interior_ty in &generator_layout.field_tys {
@@ -1603,7 +1597,6 @@ fn opaque_type_cycle_error(
16031597
}
16041598

16051599
pub(super) fn check_generator_obligations(tcx: TyCtxt<'_>, def_id: LocalDefId) {
1606-
debug_assert!(tcx.sess.opts.unstable_opts.drop_tracking_mir);
16071600
debug_assert!(matches!(tcx.def_kind(def_id), DefKind::Generator));
16081601

16091602
let typeck = tcx.typeck(def_id);

compiler/rustc_hir_typeck/src/fn_ctxt/_impl.rs

+1-19
Original file line numberDiff line numberDiff line change
@@ -510,25 +510,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
510510
}
511511

512512
pub(in super::super) fn resolve_generator_interiors(&self, def_id: DefId) {
513-
if self.tcx.sess.opts.unstable_opts.drop_tracking_mir {
514-
self.save_generator_interior_predicates(def_id);
515-
return;
516-
}
517-
518-
self.select_obligations_where_possible(|_| {});
519-
520-
let mut generators = self.deferred_generator_interiors.borrow_mut();
521-
for (generator_def_id, body_id, interior, kind) in generators.drain(..) {
522-
crate::generator_interior::resolve_interior(
523-
self,
524-
def_id,
525-
generator_def_id,
526-
body_id,
527-
interior,
528-
kind,
529-
);
530-
self.select_obligations_where_possible(|_| {});
531-
}
513+
self.save_generator_interior_predicates(def_id);
532514
}
533515

534516
/// Unify the inference variables corresponding to generator witnesses, and save all the

0 commit comments

Comments
 (0)