@@ -805,7 +805,7 @@ impl Evaluator<'_> {
805805 ProjectionElem :: Field ( Either :: Left ( f) ) => {
806806 let layout = self . layout ( & prev_ty) ?;
807807 let variant_layout = match & layout. variants {
808- Variants :: Single { .. } | Variants :: Empty => & layout,
808+ Variants :: Single { .. } | Variants :: Empty { .. } => & layout,
809809 Variants :: Multiple { variants, .. } => {
810810 & variants[ match f. parent {
811811 hir_def:: VariantId :: EnumVariantId ( it) => {
@@ -1628,8 +1628,8 @@ impl Evaluator<'_> {
16281628 return Ok ( 0 ) ;
16291629 } ;
16301630 match & layout. variants {
1631- Variants :: Empty => unreachable ! ( ) ,
1632- Variants :: Single { index } => {
1631+ Variants :: Empty { .. } => unreachable ! ( ) ,
1632+ Variants :: Single { index, .. } => {
16331633 let r =
16341634 self . const_eval_discriminant ( e. enum_variants ( self . db ) . variants [ index. 0 ] . 0 ) ?;
16351635 Ok ( r)
@@ -1790,7 +1790,7 @@ impl Evaluator<'_> {
17901790 }
17911791 let layout = self . layout_adt ( adt, subst) ?;
17921792 Ok ( match & layout. variants {
1793- Variants :: Single { .. } | Variants :: Empty => ( layout. size . bytes_usize ( ) , layout, None ) ,
1793+ Variants :: Single { .. } | Variants :: Empty { .. } => ( layout. size . bytes_usize ( ) , layout, None ) ,
17941794 Variants :: Multiple { variants, tag, tag_encoding, .. } => {
17951795 let enum_variant_id = match it {
17961796 VariantId :: EnumVariantId ( it) => it,
0 commit comments