diff --git a/src/librustc_mir/dataflow/impls/borrowed_locals.rs b/src/librustc_mir/dataflow/impls/borrowed_locals.rs index f929b2ddde0..b61dc56407e 100644 --- a/src/librustc_mir/dataflow/impls/borrowed_locals.rs +++ b/src/librustc_mir/dataflow/impls/borrowed_locals.rs @@ -99,6 +99,9 @@ impl GenKillAnalysis<'tcx> for MaybeBorrowedLocals where K: BorrowAnalysisKind<'tcx>, { + // The generator transform relies on the fact that this analysis does **not** use "before" + // effects. + fn statement_effect( &self, trans: &mut impl GenKill, diff --git a/src/librustc_mir/dataflow/impls/init_locals.rs b/src/librustc_mir/dataflow/impls/init_locals.rs index 01cb794a2e0..726330b1f03 100644 --- a/src/librustc_mir/dataflow/impls/init_locals.rs +++ b/src/librustc_mir/dataflow/impls/init_locals.rs @@ -33,6 +33,9 @@ fn initialize_start_block(&self, body: &mir::Body<'tcx>, entry_set: &mut BitSet< } impl dataflow::GenKillAnalysis<'tcx> for MaybeInitializedLocals { + // The generator transform relies on the fact that this analysis does **not** use "before" + // effects. + fn statement_effect( &self, trans: &mut impl GenKill,