From a872ec47145ce3a82c39bedaca21b99e867d9be2 Mon Sep 17 00:00:00 2001 From: Camelid Date: Mon, 14 Sep 2020 20:10:29 -0700 Subject: [PATCH] Clarify how branching works in a CFG --- compiler/rustc_middle/src/mir/mod.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/compiler/rustc_middle/src/mir/mod.rs b/compiler/rustc_middle/src/mir/mod.rs index aeaea0d102c..6f6585d383d 100644 --- a/compiler/rustc_middle/src/mir/mod.rs +++ b/compiler/rustc_middle/src/mir/mod.rs @@ -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]. /// -- 2.44.0