@@ -27,7 +27,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
2727 // discriminant, so we cannot do anything here.
2828 // When evaluating we will always error before even getting here, but ConstProp 'executes'
2929 // dead code, so we cannot ICE here.
30- if dest. layout ( ) . for_variant ( self , variant_index) . abi . is_uninhabited ( ) {
30+ if dest. layout ( ) . for_variant ( self , variant_index) . is_uninhabited ( ) {
3131 throw_ub ! ( UninhabitedEnumVariantWritten ( variant_index) )
3232 }
3333
@@ -86,7 +86,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
8686 // For consistency with `write_discriminant`, and to make sure that
8787 // `project_downcast` cannot fail due to strange layouts, we declare immediate UB
8888 // for uninhabited variants.
89- if op. layout ( ) . for_variant ( self , index) . abi . is_uninhabited ( ) {
89+ if op. layout ( ) . for_variant ( self , index) . is_uninhabited ( ) {
9090 throw_ub ! ( UninhabitedEnumVariantRead ( index) )
9191 }
9292 }
@@ -203,7 +203,7 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
203203 // Reading the discriminant of an uninhabited variant is UB. This is the basis for the
204204 // `uninhabited_enum_branching` MIR pass. It also ensures consistency with
205205 // `write_discriminant`.
206- if op. layout ( ) . for_variant ( self , index) . abi . is_uninhabited ( ) {
206+ if op. layout ( ) . for_variant ( self , index) . is_uninhabited ( ) {
207207 throw_ub ! ( UninhabitedEnumVariantRead ( index) )
208208 }
209209 interp_ok ( index)
0 commit comments