1
Fork 0

Update ProjectionElem::Downcast documentation

`ProjectionElem:::Downcast` is used when downcasting to a variant of
an enum or a generator, regardless of the number of variants.
This commit is contained in:
Tomasz Miąsko 2022-05-03 00:00:00 +00:00
parent 086bf7a8ff
commit a63d414031
2 changed files with 2 additions and 4 deletions

View file

@ -2017,9 +2017,7 @@ pub enum ProjectionElem<V, T> {
from_end: bool,
},
/// "Downcast" to a variant of an ADT. Currently, we only introduce
/// this for ADTs with more than one variant. It may be better to
/// just introduce it always, or always for enums.
/// "Downcast" to a variant of an enum or a generator.
///
/// The included Symbol is the name of the variant, used for printing MIR.
Downcast(Option<Symbol>, VariantIdx),