Skip to content

Commit

Permalink
Expand comment on NonMutatingUseContext.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjgillot committed Apr 29, 2023
1 parent 9325a25 commit 4ec76df
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions compiler/rustc_middle/src/mir/visit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 4ec76df

Please sign in to comment.