Skip to content

Commit d66a00a

Browse files
committed
Expand upon comment regarding self-assignment
1 parent abe31a9 commit d66a00a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/rustc_mir_transform/src/dataflow_const_prop.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ struct CollectAndPatch<'tcx, 'map> {
317317

318318
/// For a given MIR location, this stores the values of the operands used by that location. In
319319
/// particular, this is before the effect, such that the operands of `_1 = _1 + _2` are
320-
/// properly captured.
320+
/// properly captured. (This may become UB soon, but it is currently emitted even by safe code.)
321321
before_effect: FxHashMap<(Location, Place<'tcx>), ScalarTy<'tcx>>,
322322

323323
/// Stores the assigned values for assignments where the Rvalue is constant.

0 commit comments

Comments
 (0)