Skip to content

Commit d9680f5

Browse files
committed
Fix some comments.
1 parent 4412c7a commit d9680f5

File tree

1 file changed

+8
-7
lines changed
  • src/librustc_borrowck/borrowck/mir/dataflow

1 file changed

+8
-7
lines changed

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

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -324,9 +324,9 @@ pub trait BitDenotation {
324324
/// "transfer-function" represnting the overall-effect of the
325325
/// block, represented via GEN and KILL sets.
326326
///
327-
/// The statement here is `idx_stmt.1`; `idx_stmt.0` is just
328-
/// an identifying index: namely, the index of the statement
329-
/// in the basic block.
327+
/// The statement is identified as `bb_data[idx_stmt]`, where
328+
/// `bb_data` is the sequence of statements identifed by `bb` in
329+
/// the MIR.
330330
fn statement_effect(&self,
331331
ctxt: &Self::Ctxt,
332332
sets: &mut BlockSets<Self::Idx>,
@@ -341,10 +341,6 @@ pub trait BitDenotation {
341341
/// "transfer-function" represnting the overall-effect of the
342342
/// block, represented via GEN and KILL sets.
343343
///
344-
/// The terminator here is `idx_term.1`; `idx_term.0` is just an
345-
/// identifying index: namely, the number of statements in `bb`
346-
/// itself.
347-
///
348344
/// The effects applied here cannot depend on which branch the
349345
/// terminator took.
350346
fn terminator_effect(&self,
@@ -367,6 +363,11 @@ pub trait BitDenotation {
367363
/// flow-dependent, the current MIR cannot encode them via just
368364
/// GEN and KILL sets attached to the block, and so instead we add
369365
/// this extra machinery to represent the flow-dependent effect.
366+
///
367+
/// FIXME: Right now this is a bit of a wart in the API. It might
368+
/// be better to represent this as an additional gen- and
369+
/// kill-sets associated with each edge coming out of the basic
370+
/// block.
370371
fn propagate_call_return(&self,
371372
ctxt: &Self::Ctxt,
372373
in_out: &mut IdxSet<Self::Idx>,

0 commit comments

Comments
 (0)