diff options
| author | Dylan MacKenzie <ecstaticmorse@gmail.com> | 2020-05-07 13:13:02 -0700 |
|---|---|---|
| committer | Dylan MacKenzie <ecstaticmorse@gmail.com> | 2020-05-07 13:13:46 -0700 |
| commit | 046848e23dec4f9327b613617026e93c6c87683b (patch) | |
| tree | d51224f614036c59f406d744f21d2588d3e2f02e | |
| parent | 34508d88800a024b6287cf0a5a4bb6dffe6da6f3 (diff) | |
| download | rust-046848e23dec4f9327b613617026e93c6c87683b.tar.gz rust-046848e23dec4f9327b613617026e93c6c87683b.zip | |
Incorporate old module docs into `MaybeLiveLocals` docs
| -rw-r--r-- | src/librustc_mir/dataflow/impls/liveness.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/librustc_mir/dataflow/impls/liveness.rs b/src/librustc_mir/dataflow/impls/liveness.rs index 5e9bec89ac0..d24faacd377 100644 --- a/src/librustc_mir/dataflow/impls/liveness.rs +++ b/src/librustc_mir/dataflow/impls/liveness.rs @@ -6,6 +6,13 @@ use crate::dataflow::{AnalysisDomain, Backward, BottomValue, GenKill, GenKillAna /// A [live-variable dataflow analysis][liveness]. /// +/// This analysis considers references as being used only at the point of the +/// borrow. In other words, this analysis does not track uses because of references that already +/// exist. See [this `mir-datalow` test][flow-test] for an example. You almost never want to use +/// this analysis without also looking at the results of [`MaybeBorrowedLocals`]. +/// +/// [`MaybeBorrowedLocals`]: ../struct.MaybeBorrowedLocals.html +/// [flow-test]: https://github.com/rust-lang/rust/blob/a08c47310c7d49cbdc5d7afb38408ba519967ecd/src/test/ui/mir-dataflow/liveness-ptr.rs /// [liveness]: https://en.wikipedia.org/wiki/Live_variable_analysis pub struct MaybeLiveLocals; |
