diff --git a/compiler/rustc_typeck/src/check/generator_interior.rs b/compiler/rustc_typeck/src/check/generator_interior.rs index bfe0200101c..85a0d4e4499 100644 --- a/compiler/rustc_typeck/src/check/generator_interior.rs +++ b/compiler/rustc_typeck/src/check/generator_interior.rs @@ -584,7 +584,7 @@ fn check_must_not_suspend_ty<'tcx>( } // If drop tracking is enabled, we want to look through references, since the referrent // may not be considered live across the await point. - ty::Ref(_region, ty, _mutability) if fcx.sess().opts.debugging_opts.drop_tracking => { + ty::Ref(_region, ty, _mutability) if fcx.sess().opts.unstable_opts.drop_tracking => { let descr_pre = &format!("{}reference{} to ", data.descr_pre, plural_suffix); check_must_not_suspend_ty(fcx, ty, hir_id, SuspendCheckData { descr_pre, ..data }) } diff --git a/src/test/ui/lint/must_not_suspend/ref-drop-tracking.stderr b/src/test/ui/lint/must_not_suspend/ref-drop-tracking.stderr index 33c7ff2cb33..c49d2712853 100644 --- a/src/test/ui/lint/must_not_suspend/ref-drop-tracking.stderr +++ b/src/test/ui/lint/must_not_suspend/ref-drop-tracking.stderr @@ -3,7 +3,7 @@ error: reference to `Umm` held across a suspend point, but should not be | LL | let guard = &mut self.u; | ^^^^^ -LL | +LL | LL | other().await; | ------ the value is held across this suspend point |