Note that BasicBlock
is just an index
This commit is contained in:
parent
f1b97ee7f8
commit
91ba04d872
1 changed files with 4 additions and 1 deletions
|
@ -146,7 +146,7 @@ impl<'tcx> MirSource<'tcx> {
|
||||||
/// The lowered representation of a single function.
|
/// The lowered representation of a single function.
|
||||||
#[derive(Clone, TyEncodable, TyDecodable, Debug, HashStable, TypeFoldable)]
|
#[derive(Clone, TyEncodable, TyDecodable, Debug, HashStable, TypeFoldable)]
|
||||||
pub struct Body<'tcx> {
|
pub struct Body<'tcx> {
|
||||||
/// A list of basic blocks. References to basic block use a newtyped index type `BasicBlock`
|
/// A list of basic blocks. References to basic block use a newtyped index type [`BasicBlock`]
|
||||||
/// that indexes into this vector.
|
/// that indexes into this vector.
|
||||||
basic_blocks: IndexVec<BasicBlock, BasicBlockData<'tcx>>,
|
basic_blocks: IndexVec<BasicBlock, BasicBlockData<'tcx>>,
|
||||||
|
|
||||||
|
@ -1106,6 +1106,9 @@ rustc_index::newtype_index! {
|
||||||
/// are edges that go from a multi-successor node to a multi-predecessor node. This pass is
|
/// are edges that go from a multi-successor node to a multi-predecessor node. This pass is
|
||||||
/// needed because some analyses require that there are no critical edges in the CFG.
|
/// needed because some analyses require that there are no critical edges in the CFG.
|
||||||
///
|
///
|
||||||
|
/// Note that this type is just an index into [`Body.basic_blocks`](Body::basic_blocks);
|
||||||
|
/// the actual data that a basic block holds is in [`BasicBlockData`].
|
||||||
|
///
|
||||||
/// Read more about basic blocks in the [rustc-dev-guide][guide-mir].
|
/// Read more about basic blocks in the [rustc-dev-guide][guide-mir].
|
||||||
///
|
///
|
||||||
/// [CFG]: https://rustc-dev-guide.rust-lang.org/appendix/background.html#cfg
|
/// [CFG]: https://rustc-dev-guide.rust-lang.org/appendix/background.html#cfg
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue