interpret: project_downcast: do not ICE for uninhabited variants
This commit is contained in:
parent
69db514ed9
commit
1025a12b64
4 changed files with 30 additions and 19 deletions
|
@ -1074,6 +1074,8 @@ pub enum ProjectionElem<V, T> {
|
|||
/// "Downcast" to a variant of an enum or a coroutine.
|
||||
///
|
||||
/// The included Symbol is the name of the variant, used for printing MIR.
|
||||
///
|
||||
/// This operation itself is never UB, all it does is change the type of the place.
|
||||
Downcast(Option<Symbol>, VariantIdx),
|
||||
|
||||
/// Like an explicit cast from an opaque type to a concrete type, but without
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue