mod drop_ranges;
-// FIXME(eholk): This flag is here to give a quick way to disable drop tracking in case we find
-// unexpected breakages while it's still new. It should be removed before too long. For example,
-// see #93161.
-const ENABLE_DROP_TRACKING: bool = false;
-
struct InteriorVisitor<'a, 'tcx> {
fcx: &'a FnCtxt<'a, 'tcx>,
types: FxIndexSet<ty::GeneratorInteriorTypeCause<'tcx>>,
yield_data.expr_and_pat_count, self.expr_count, source_span
);
- if ENABLE_DROP_TRACKING
+ if self.fcx.sess().opts.debugging_opts.drop_tracking
&& self
.drop_ranges
.is_dropped_at(hir_id, yield_data.expr_and_pat_count)
self.types.insert(ty::GeneratorInteriorTypeCause {
span: source_span,
- ty: &ty,
+ ty,
scope_span,
yield_span: yield_data.span,
expr: expr.map(|e| e.hir_id),
};
intravisit::walk_body(&mut visitor, body);
- // Check that we visited the same amount of expressions and the RegionResolutionVisitor
+ // Check that we visited the same amount of expressions as the RegionResolutionVisitor
let region_expr_count = visitor.region_scope_tree.body_expr_count(body_id).unwrap();
assert_eq!(region_expr_count, visitor.expr_count);
let tcx = self.fcx.tcx;
let ref_ty = tcx.mk_ref(
// Use `ReErased` as `resolve_interior` is going to replace all the regions anyway.
- tcx.mk_region(ty::RegionKind::ReErased),
+ tcx.mk_region(ty::ReErased),
ty::TypeAndMut { ty, mutbl: hir::Mutability::Not },
);
self.record(