diff options
| author | bors <bors@rust-lang.org> | 2020-10-18 09:08:00 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-10-18 09:08:00 +0000 |
| commit | ad268bd63894953ab7038f082aa744d6a832639b (patch) | |
| tree | 919a7c28850865c41752d00c90dfe1b3dd53874e | |
| parent | 94332bbe100103fefafd9609ced01e0712dd71dd (diff) | |
| parent | 91ba04d872ad13b93e80c8bda42d06b62d5deaa2 (diff) | |
| download | rust-ad268bd63894953ab7038f082aa744d6a832639b.tar.gz rust-ad268bd63894953ab7038f082aa744d6a832639b.zip | |
Auto merge of #78035 - camelid:basic-block-pointer-note, r=RalfJung
Note that `BasicBlock` is just an index r? `@RalfJung`
| -rw-r--r-- | compiler/rustc_middle/src/mir/mod.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/rustc_middle/src/mir/mod.rs b/compiler/rustc_middle/src/mir/mod.rs index 16472c78757..b38efedbf60 100644 --- a/compiler/rustc_middle/src/mir/mod.rs +++ b/compiler/rustc_middle/src/mir/mod.rs @@ -146,7 +146,7 @@ impl<'tcx> MirSource<'tcx> { /// The lowered representation of a single function. #[derive(Clone, TyEncodable, TyDecodable, Debug, HashStable, TypeFoldable)] 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. 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 /// 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]. /// /// [CFG]: https://rustc-dev-guide.rust-lang.org/appendix/background.html#cfg |
