Skip to content

Commit 046848e

Browse files
Incorporate old module docs into MaybeLiveLocals docs
1 parent 34508d8 commit 046848e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/librustc_mir/dataflow/impls/liveness.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ use crate::dataflow::{AnalysisDomain, Backward, BottomValue, GenKill, GenKillAna
66

77
/// A [live-variable dataflow analysis][liveness].
88
///
9+
/// This analysis considers references as being used only at the point of the
10+
/// borrow. In other words, this analysis does not track uses because of references that already
11+
/// exist. See [this `mir-datalow` test][flow-test] for an example. You almost never want to use
12+
/// this analysis without also looking at the results of [`MaybeBorrowedLocals`].
13+
///
14+
/// [`MaybeBorrowedLocals`]: ../struct.MaybeBorrowedLocals.html
15+
/// [flow-test]: https://github.com/rust-lang/rust/blob/a08c47310c7d49cbdc5d7afb38408ba519967ecd/src/test/ui/mir-dataflow/liveness-ptr.rs
916
/// [liveness]: https://en.wikipedia.org/wiki/Live_variable_analysis
1017
pub struct MaybeLiveLocals;
1118

0 commit comments

Comments
 (0)