Rollup merge of #99019 - pierwill:doc-mir-statement, r=cjgillot
Add doc comments in `rustc_middle::mir`
This commit is contained in:
commit
e58c2d4f52
1 changed files with 4 additions and 1 deletions
|
@ -1048,6 +1048,8 @@ impl BasicBlock {
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// BasicBlockData
|
// 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.
|
/// See [`BasicBlock`] for documentation on what basic blocks are at a high level.
|
||||||
#[derive(Clone, Debug, TyEncodable, TyDecodable, HashStable, TypeFoldable, TypeVisitable)]
|
#[derive(Clone, Debug, TyEncodable, TyDecodable, HashStable, TypeFoldable, TypeVisitable)]
|
||||||
pub struct BasicBlockData<'tcx> {
|
pub struct BasicBlockData<'tcx> {
|
||||||
|
@ -1079,7 +1081,7 @@ impl<'tcx> BasicBlockData<'tcx> {
|
||||||
/// Accessor for terminator.
|
/// Accessor for terminator.
|
||||||
///
|
///
|
||||||
/// Terminator may not be None after construction of the basic block is complete. This accessor
|
/// 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]
|
#[inline]
|
||||||
pub fn terminator(&self) -> &Terminator<'tcx> {
|
pub fn terminator(&self) -> &Terminator<'tcx> {
|
||||||
self.terminator.as_ref().expect("invalid terminator state")
|
self.terminator.as_ref().expect("invalid terminator state")
|
||||||
|
@ -1286,6 +1288,7 @@ impl<O: fmt::Debug> fmt::Debug for AssertKind<O> {
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// Statements
|
// Statements
|
||||||
|
|
||||||
|
/// A statement in a basic block, including information about its source code.
|
||||||
#[derive(Clone, TyEncodable, TyDecodable, HashStable, TypeFoldable, TypeVisitable)]
|
#[derive(Clone, TyEncodable, TyDecodable, HashStable, TypeFoldable, TypeVisitable)]
|
||||||
pub struct Statement<'tcx> {
|
pub struct Statement<'tcx> {
|
||||||
pub source_info: SourceInfo,
|
pub source_info: SourceInfo,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue