From 9c468f4b65961ec1d3ce3f993c59d250afde00be Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Fri, 20 May 2016 13:20:33 +0200 Subject: [PATCH] Added comment pointing out somewhat subtle initialization in `fn start_block_effect`. --- src/librustc_borrowck/borrowck/mir/dataflow/mod.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/librustc_borrowck/borrowck/mir/dataflow/mod.rs b/src/librustc_borrowck/borrowck/mir/dataflow/mod.rs index cb110e606f2..4bc5a5409ec 100644 --- a/src/librustc_borrowck/borrowck/mir/dataflow/mod.rs +++ b/src/librustc_borrowck/borrowck/mir/dataflow/mod.rs @@ -951,6 +951,7 @@ impl<'a, 'tcx> BitDenotation for MaybeUninitializedLvals<'a, 'tcx> { // sets on_entry bits for Arg lvalues fn start_block_effect(&self, ctxt: &Self::Ctxt, sets: &mut BlockSets) { + // set all bits to 1 (uninit) before gathering counterevidence for e in &mut sets.on_entry[..] { *e = !0; } super::drop_flag_effects_for_function_entry(