]> git.lizzy.rs Git - rust.git/commitdiff
Clarify how branching works in a CFG
authorCamelid <camelidcamel@gmail.com>
Tue, 15 Sep 2020 03:10:29 +0000 (20:10 -0700)
committerCamelid <camelidcamel@gmail.com>
Tue, 15 Sep 2020 03:10:29 +0000 (20:10 -0700)
compiler/rustc_middle/src/mir/mod.rs

index aeaea0d102c0d6015e680cdc1de3b328e499feef..6f6585d383d5236747409ac424611a5903df8aed 100644 (file)
@@ -1079,9 +1079,11 @@ pub struct VarDebugInfo<'tcx> {
     /// The unit of the MIR [control-flow graph][CFG].
     ///
     /// There is no branching (e.g., `if`s, function calls, etc.) within a basic block, which makes
-    /// it easier to do [data-flow analyses] and optimizations. Basic blocks consist of a series of
-    /// [statements][`Statement`], ending with a [terminator][`Terminator`]. Basic blocks can have
-    /// multiple predecessors and successors.
+    /// it easier to do [data-flow analyses] and optimizations. Instead, branches are represented
+    /// as an edge in a graph between basic blocks.
+    ///
+    /// Basic blocks consist of a series of [statements][`Statement`], ending with a
+    /// [terminator][`Terminator`]. Basic blocks can have multiple predecessors and successors.
     ///
     /// Read more about basic blocks in the [rustc-dev-guide][guide-mir].
     ///