Skip to content

Commit 4ec76df

Browse files
committed
Expand comment on NonMutatingUseContext.
1 parent 9325a25 commit 4ec76df

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

compiler/rustc_middle/src/mir/visit.rs

+3
Original file line numberDiff line numberDiff line change
@@ -1252,6 +1252,9 @@ pub enum NonMutatingUseContext {
12521252
/// AddressOf for *const pointer.
12531253
AddressOf,
12541254
/// PlaceMention statement.
1255+
///
1256+
/// This statement is executed as a check that the `Place` is live without reading from it,
1257+
/// so it must be considered as a non-mutating use.
12551258
PlaceMention,
12561259
/// Used as base for another place, e.g., `x` in `x.y`. Will not mutate the place.
12571260
/// For example, the projection `x.y` is not marked as a mutation in these cases:

0 commit comments

Comments
 (0)