diff options
| author | Jannis Christopher Köhl <mail@koehl.dev> | 2022-09-04 12:29:49 +0200 |
|---|---|---|
| committer | Jannis Christopher Köhl <mail@koehl.dev> | 2022-11-07 10:35:15 +0100 |
| commit | e2ddf8a6e579ca1d92fdddd8bead46277c3261eb (patch) | |
| tree | 8e556c020d37b2dd6dd54ff1b766b2224e37282a /compiler/rustc_mir_dataflow | |
| parent | 1e5ca5701496a73d822b8dff220c7a8e8463724b (diff) | |
| download | rust-e2ddf8a6e579ca1d92fdddd8bead46277c3261eb.tar.gz rust-e2ddf8a6e579ca1d92fdddd8bead46277c3261eb.zip | |
Add comment about downcast projection element
Diffstat (limited to 'compiler/rustc_mir_dataflow')
| -rw-r--r-- | compiler/rustc_mir_dataflow/src/value_analysis.rs | 5 |
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(()), _ => (), |
