diff options
| author | Camille Gillot <gillot.camille@gmail.com> | 2025-08-21 23:59:20 +0000 |
|---|---|---|
| committer | Camille Gillot <gillot.camille@gmail.com> | 2025-08-21 23:59:20 +0000 |
| commit | e5bd01b533cfc85eb8a86d5f47d99e1c62d0e44d (patch) | |
| tree | bf3a8be912b097e26ae5bbdef0275a4ea141fce7 /compiler/rustc_mir_dataflow | |
| parent | 37e7f52876e490eaec1c55dad6702f02cbe181e5 (diff) | |
| download | rust-e5bd01b533cfc85eb8a86d5f47d99e1c62d0e44d.tar.gz rust-e5bd01b533cfc85eb8a86d5f47d99e1c62d0e44d.zip | |
Correct comments.
Diffstat (limited to 'compiler/rustc_mir_dataflow')
| -rw-r--r-- | compiler/rustc_mir_dataflow/src/move_paths/mod.rs | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/compiler/rustc_mir_dataflow/src/move_paths/mod.rs b/compiler/rustc_mir_dataflow/src/move_paths/mod.rs index 80fb47bc6e1..466416d63f5 100644 --- a/compiler/rustc_mir_dataflow/src/move_paths/mod.rs +++ b/compiler/rustc_mir_dataflow/src/move_paths/mod.rs @@ -1,15 +1,14 @@ -//! The move-analysis portion of borrowck needs to work in an abstract -//! domain of lifted `Place`s. Most of the `Place` variants fall into a -//! one-to-one mapping between the concrete and abstract (e.g., a -//! field-deref on a local variable, `x.field`, has the same meaning -//! in both domains). Indexed projections are the exception: `a[x]` -//! needs to be treated as mapping to the same move path as `a[y]` as -//! well as `a[13]`, etc. So we map these `x`/`y` values to `()`. +//! The move-analysis portion of borrowck needs to work in an abstract domain of lifted `Place`s. +//! Most of the `Place` variants fall into a one-to-one mapping between the concrete and abstract +//! (e.g., a field projection on a local variable, `x.field`, has the same meaning in both +//! domains). In other words, all field projections for the same field on the same local do not +//! have meaningfully different types if ever. Indexed projections are the exception: `a[x]` needs +//! to be treated as mapping to the same move path as `a[y]` as well as `a[13]`, etc. So we map +//! these `x`/`y` values to `()`. //! -//! (In theory, the analysis could be extended to work with sets of -//! paths, so that `a[0]` and `a[13]` could be kept distinct, while -//! `a[x]` would still overlap them both. But that is not this -//! representation does today.) +//! (In theory, the analysis could be extended to work with sets of paths, so that `a[0]` and +//! `a[13]` could be kept distinct, while `a[x]` would still overlap them both. But that is not +//! what this representation does today.) use std::fmt; use std::ops::{Index, IndexMut}; |
