@@ -418,7 +418,7 @@ pub(crate) fn mir_const_from_ty_const<'tcx>(
418
418
ty : Ty < ' tcx > ,
419
419
) -> stable_mir:: ty:: MirConst {
420
420
let kind = match ty_const. kind ( ) {
421
- ty:: Value ( ty, val) => {
421
+ ty:: ConstKind :: Value ( ty, val) => {
422
422
let val = match val {
423
423
ty:: ValTree :: Leaf ( scalar) => ty:: ValTree :: Leaf ( scalar) ,
424
424
ty:: ValTree :: Branch ( branch) => {
@@ -435,19 +435,19 @@ pub(crate) fn mir_const_from_ty_const<'tcx>(
435
435
) )
436
436
}
437
437
}
438
- ty:: ParamCt ( param) => stable_mir:: ty:: ConstantKind :: Param ( param. stable ( tables) ) ,
439
- ty:: ErrorCt ( _) => unreachable ! ( ) ,
440
- ty:: InferCt ( _) => unreachable ! ( ) ,
441
- ty:: BoundCt ( _, _) => unimplemented ! ( ) ,
442
- ty:: PlaceholderCt ( _) => unimplemented ! ( ) ,
443
- ty:: Unevaluated ( uv) => {
438
+ ty:: ConstKind :: Param ( param) => stable_mir:: ty:: ConstantKind :: Param ( param. stable ( tables) ) ,
439
+ ty:: ConstKind :: Error ( _) => unreachable ! ( ) ,
440
+ ty:: ConstKind :: Infer ( _) => unreachable ! ( ) ,
441
+ ty:: ConstKind :: Bound ( _, _) => unimplemented ! ( ) ,
442
+ ty:: ConstKind :: Placeholder ( _) => unimplemented ! ( ) ,
443
+ ty:: ConstKind :: Unevaluated ( uv) => {
444
444
stable_mir:: ty:: ConstantKind :: Unevaluated ( stable_mir:: ty:: UnevaluatedConst {
445
445
def : tables. const_def ( uv. def ) ,
446
446
args : uv. args . stable ( tables) ,
447
447
promoted : None ,
448
448
} )
449
449
}
450
- ty:: ExprCt ( _) => unimplemented ! ( ) ,
450
+ ty:: ConstKind :: Expr ( _) => unimplemented ! ( ) ,
451
451
} ;
452
452
let stable_ty = tables. intern_ty ( ty) ;
453
453
let id = tables. intern_mir_const ( mir:: Const :: Ty ( ty, ty_const) ) ;
@@ -459,7 +459,7 @@ impl<'tcx> Stable<'tcx> for ty::Const<'tcx> {
459
459
460
460
fn stable ( & self , tables : & mut Tables < ' _ > ) -> Self :: T {
461
461
let kind = match self . kind ( ) {
462
- ty:: Value ( ty, val) => {
462
+ ty:: ConstKind :: Value ( ty, val) => {
463
463
let val = match val {
464
464
ty:: ValTree :: Leaf ( scalar) => ty:: ValTree :: Leaf ( scalar) ,
465
465
ty:: ValTree :: Branch ( branch) => {
@@ -478,16 +478,16 @@ impl<'tcx> Stable<'tcx> for ty::Const<'tcx> {
478
478
)
479
479
}
480
480
}
481
- ty:: ParamCt ( param) => stable_mir:: ty:: TyConstKind :: Param ( param. stable ( tables) ) ,
482
- ty:: Unevaluated ( uv) => stable_mir:: ty:: TyConstKind :: Unevaluated (
481
+ ty:: ConstKind :: Param ( param) => stable_mir:: ty:: TyConstKind :: Param ( param. stable ( tables) ) ,
482
+ ty:: ConstKind :: Unevaluated ( uv) => stable_mir:: ty:: TyConstKind :: Unevaluated (
483
483
tables. const_def ( uv. def ) ,
484
484
uv. args . stable ( tables) ,
485
485
) ,
486
- ty:: ErrorCt ( _) => unreachable ! ( ) ,
487
- ty:: InferCt ( _) => unreachable ! ( ) ,
488
- ty:: BoundCt ( _, _) => unimplemented ! ( ) ,
489
- ty:: PlaceholderCt ( _) => unimplemented ! ( ) ,
490
- ty:: ExprCt ( _) => unimplemented ! ( ) ,
486
+ ty:: ConstKind :: Error ( _) => unreachable ! ( ) ,
487
+ ty:: ConstKind :: Infer ( _) => unreachable ! ( ) ,
488
+ ty:: ConstKind :: Bound ( _, _) => unimplemented ! ( ) ,
489
+ ty:: ConstKind :: Placeholder ( _) => unimplemented ! ( ) ,
490
+ ty:: ConstKind :: Expr ( _) => unimplemented ! ( ) ,
491
491
} ;
492
492
let id = tables. intern_ty_const ( tables. tcx . lift ( * self ) . unwrap ( ) ) ;
493
493
stable_mir:: ty:: TyConst :: new ( kind, id)
0 commit comments