Skip to content

Commit e58c2d4

Browse files
authored
Rollup merge of rust-lang#99019 - pierwill:doc-mir-statement, r=cjgillot
Add doc comments in `rustc_middle::mir`
2 parents 6c6791a + 933a994 commit e58c2d4

File tree

1 file changed

+4
-1
lines changed
  • compiler/rustc_middle/src/mir

1 file changed

+4
-1
lines changed

Diff for: compiler/rustc_middle/src/mir/mod.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1048,6 +1048,8 @@ impl BasicBlock {
10481048
///////////////////////////////////////////////////////////////////////////
10491049
// BasicBlockData
10501050

1051+
/// Data for a basic block, including a list of its statements.
1052+
///
10511053
/// See [`BasicBlock`] for documentation on what basic blocks are at a high level.
10521054
#[derive(Clone, Debug, TyEncodable, TyDecodable, HashStable, TypeFoldable, TypeVisitable)]
10531055
pub struct BasicBlockData<'tcx> {
@@ -1079,7 +1081,7 @@ impl<'tcx> BasicBlockData<'tcx> {
10791081
/// Accessor for terminator.
10801082
///
10811083
/// Terminator may not be None after construction of the basic block is complete. This accessor
1082-
/// provides a convenience way to reach the terminator.
1084+
/// provides a convenient way to reach the terminator.
10831085
#[inline]
10841086
pub fn terminator(&self) -> &Terminator<'tcx> {
10851087
self.terminator.as_ref().expect("invalid terminator state")
@@ -1286,6 +1288,7 @@ impl<O: fmt::Debug> fmt::Debug for AssertKind<O> {
12861288
///////////////////////////////////////////////////////////////////////////
12871289
// Statements
12881290

1291+
/// A statement in a basic block, including information about its source code.
12891292
#[derive(Clone, TyEncodable, TyDecodable, HashStable, TypeFoldable, TypeVisitable)]
12901293
pub struct Statement<'tcx> {
12911294
pub source_info: SourceInfo,

0 commit comments

Comments
 (0)