diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2023-04-29 16:16:41 +0000 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2023-04-29 16:16:41 +0000 |
| commit | 4ec76df4a9edc6c7a3a69a82bd3eab3881b70ffa (patch) | |
| tree | 9c8db03e6f9e2e98da190bd1160de3f611914e3f | |
| parent | 9325a254f0455e375846a2e4aa6bcdf848527d2a (diff) | |
| download | rust-4ec76df4a9edc6c7a3a69a82bd3eab3881b70ffa.tar.gz rust-4ec76df4a9edc6c7a3a69a82bd3eab3881b70ffa.zip | |
Expand comment on NonMutatingUseContext.
| -rw-r--r-- | compiler/rustc_middle/src/mir/visit.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_middle/src/mir/visit.rs b/compiler/rustc_middle/src/mir/visit.rs index eb5bcbb67eb..8e8ca7874f5 100644 --- a/compiler/rustc_middle/src/mir/visit.rs +++ b/compiler/rustc_middle/src/mir/visit.rs @@ -1252,6 +1252,9 @@ pub enum NonMutatingUseContext { /// AddressOf for *const pointer. AddressOf, /// PlaceMention statement. + /// + /// This statement is executed as a check that the `Place` is live without reading from it, + /// so it must be considered as a non-mutating use. PlaceMention, /// Used as base for another place, e.g., `x` in `x.y`. Will not mutate the place. /// For example, the projection `x.y` is not marked as a mutation in these cases: |
