about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJannis Christopher Köhl <mail@koehl.dev>2022-11-12 20:05:52 +0100
committerJannis Christopher Köhl <mail@koehl.dev>2022-11-12 20:05:52 +0100
commitd66a00a7b192f7332288e6386ac99f63f7e1d8ac (patch)
tree3a4d3b3d997917816f02e7e6626609ff6b8668e3
parentabe31a9986db85ac8e146a5d062fc6d186c5bd9a (diff)
downloadrust-d66a00a7b192f7332288e6386ac99f63f7e1d8ac.tar.gz
rust-d66a00a7b192f7332288e6386ac99f63f7e1d8ac.zip
Expand upon comment regarding self-assignment
-rw-r--r--compiler/rustc_mir_transform/src/dataflow_const_prop.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_mir_transform/src/dataflow_const_prop.rs b/compiler/rustc_mir_transform/src/dataflow_const_prop.rs
index 085977dac83..c1293b3b7b6 100644
--- a/compiler/rustc_mir_transform/src/dataflow_const_prop.rs
+++ b/compiler/rustc_mir_transform/src/dataflow_const_prop.rs
@@ -317,7 +317,7 @@ struct CollectAndPatch<'tcx, 'map> {
 
     /// For a given MIR location, this stores the values of the operands used by that location. In
     /// particular, this is before the effect, such that the operands of `_1 = _1 + _2` are
-    /// properly captured.
+    /// properly captured. (This may become UB soon, but it is currently emitted even by safe code.)
     before_effect: FxHashMap<(Location, Place<'tcx>), ScalarTy<'tcx>>,
 
     /// Stores the assigned values for assignments where the Rvalue is constant.