Skip to content

Commit 9c468f4

Browse files
committed
Added comment pointing out somewhat subtle initialization in fn start_block_effect.
1 parent 011c37d commit 9c468f4

File tree

1 file changed

+1
-0
lines changed
  • src/librustc_borrowck/borrowck/mir/dataflow

1 file changed

+1
-0
lines changed

src/librustc_borrowck/borrowck/mir/dataflow/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -951,6 +951,7 @@ impl<'a, 'tcx> BitDenotation for MaybeUninitializedLvals<'a, 'tcx> {
951951

952952
// sets on_entry bits for Arg lvalues
953953
fn start_block_effect(&self, ctxt: &Self::Ctxt, sets: &mut BlockSets) {
954+
// set all bits to 1 (uninit) before gathering counterevidence
954955
for e in &mut sets.on_entry[..] { *e = !0; }
955956

956957
super::drop_flag_effects_for_function_entry(

0 commit comments

Comments
 (0)