about summary refs log tree commit diff
path: root/compiler/rustc_mir_dataflow
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_mir_dataflow')
-rw-r--r--compiler/rustc_mir_dataflow/src/value_analysis.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/rustc_mir_dataflow/src/value_analysis.rs b/compiler/rustc_mir_dataflow/src/value_analysis.rs
index f625f71ccda..80d343e2b53 100644
--- a/compiler/rustc_mir_dataflow/src/value_analysis.rs
+++ b/compiler/rustc_mir_dataflow/src/value_analysis.rs
@@ -582,7 +582,10 @@ impl Map {
 
         // Apply the projection.
         for &elem in projection {
-            // For now, downcast is not allowed (see #101168).
+            // For now, downcast is not allowed due to aliasing between variants (see #101168).
+            // Also, according to the documentation of [`Place`], a single-variant type can be
+            // projected with and without a [`ProjectionElem::Downcast`]. This creates an ambiguity
+            // that needs to be resolved.
             match elem {
                 PlaceElem::Downcast(..) => return Err(()),
                 _ => (),