Skip to content

Commit 3bdc317

Browse files
committed
Add docs
1 parent 1ca39d8 commit 3bdc317

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

compiler/rustc_middle/src/mir/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -825,6 +825,8 @@ pub struct LocalDecl<'tcx> {
825825
/// ```
826826
pub source_info: SourceInfo,
827827

828+
/// `true` if the local has a fixed storage for the duration of the body
829+
/// (that is, it does not have `StorageLive`/`StorageDead` annotations).
828830
pub always_storage_live: bool,
829831
}
830832

compiler/rustc_mir_dataflow/src/storage.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
use rustc_index::bit_set::BitSet;
22
use rustc_middle::mir::{self, HasLocalDecls, Local};
33

4-
/// The set of locals in a MIR body that do not have `StorageLive`/`StorageDead` annotations.
4+
/// Returns the set of locals in a MIR body that do not have `StorageLive`/`StorageDead`
5+
/// annotations.
56
///
67
/// These locals have fixed storage for the duration of the body.
78
pub fn always_live_locals(body: &mir::Body<'_>) -> BitSet<Local> {

0 commit comments

Comments
 (0)