mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
Add comment about downcast projection element
This commit is contained in:
parent
1e5ca57014
commit
e2ddf8a6e5
@ -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(()),
|
||||
_ => (),
|
||||
|
Loading…
Reference in New Issue
Block a user