diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-07-08 08:00:40 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-08 08:00:40 +0200 |
| commit | e58c2d4f52b6dfcd7095c4f12a7ef8879d282189 (patch) | |
| tree | 6df5f33cf9b2cfc4bc24dff81c32a1f5b19436a3 | |
| parent | 6c6791a45831f2c15367fb96d09ea18f756d621e (diff) | |
| parent | 933a9941114a9ac5ce92cc7197498f698a86c3f4 (diff) | |
| download | rust-e58c2d4f52b6dfcd7095c4f12a7ef8879d282189.tar.gz rust-e58c2d4f52b6dfcd7095c4f12a7ef8879d282189.zip | |
Rollup merge of #99019 - pierwill:doc-mir-statement, r=cjgillot
Add doc comments in `rustc_middle::mir`
| -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 93686128101..f136b8e2368 100644 --- a/compiler/rustc_middle/src/mir/mod.rs +++ b/compiler/rustc_middle/src/mir/mod.rs @@ -1048,6 +1048,8 @@ impl BasicBlock { /////////////////////////////////////////////////////////////////////////// // BasicBlockData +/// Data for a basic block, including a list of its statements. +/// /// See [`BasicBlock`] for documentation on what basic blocks are at a high level. #[derive(Clone, Debug, TyEncodable, TyDecodable, HashStable, TypeFoldable, TypeVisitable)] pub struct BasicBlockData<'tcx> { @@ -1079,7 +1081,7 @@ impl<'tcx> BasicBlockData<'tcx> { /// Accessor for terminator. /// /// Terminator may not be None after construction of the basic block is complete. This accessor - /// provides a convenience way to reach the terminator. + /// provides a convenient way to reach the terminator. #[inline] pub fn terminator(&self) -> &Terminator<'tcx> { self.terminator.as_ref().expect("invalid terminator state") @@ -1286,6 +1288,7 @@ impl<O: fmt::Debug> fmt::Debug for AssertKind<O> { /////////////////////////////////////////////////////////////////////////// // Statements +/// A statement in a basic block, including information about its source code. #[derive(Clone, TyEncodable, TyDecodable, HashStable, TypeFoldable, TypeVisitable)] pub struct Statement<'tcx> { pub source_info: SourceInfo, |
