@@ -418,7 +418,7 @@ pub(crate) fn mir_const_from_ty_const<'tcx>(
418418 ty : Ty < ' tcx > ,
419419) -> stable_mir:: ty:: MirConst {
420420 let kind = match ty_const. kind ( ) {
421- ty:: Value ( ty, val) => {
421+ ty:: ConstKind :: Value ( ty, val) => {
422422 let val = match val {
423423 ty:: ValTree :: Leaf ( scalar) => ty:: ValTree :: Leaf ( scalar) ,
424424 ty:: ValTree :: Branch ( branch) => {
@@ -435,19 +435,19 @@ pub(crate) fn mir_const_from_ty_const<'tcx>(
435435 ) )
436436 }
437437 }
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) => {
444444 stable_mir:: ty:: ConstantKind :: Unevaluated ( stable_mir:: ty:: UnevaluatedConst {
445445 def : tables. const_def ( uv. def ) ,
446446 args : uv. args . stable ( tables) ,
447447 promoted : None ,
448448 } )
449449 }
450- ty:: ExprCt ( _) => unimplemented ! ( ) ,
450+ ty:: ConstKind :: Expr ( _) => unimplemented ! ( ) ,
451451 } ;
452452 let stable_ty = tables. intern_ty ( ty) ;
453453 let id = tables. intern_mir_const ( mir:: Const :: Ty ( ty, ty_const) ) ;
@@ -459,7 +459,7 @@ impl<'tcx> Stable<'tcx> for ty::Const<'tcx> {
459459
460460 fn stable ( & self , tables : & mut Tables < ' _ > ) -> Self :: T {
461461 let kind = match self . kind ( ) {
462- ty:: Value ( ty, val) => {
462+ ty:: ConstKind :: Value ( ty, val) => {
463463 let val = match val {
464464 ty:: ValTree :: Leaf ( scalar) => ty:: ValTree :: Leaf ( scalar) ,
465465 ty:: ValTree :: Branch ( branch) => {
@@ -478,16 +478,16 @@ impl<'tcx> Stable<'tcx> for ty::Const<'tcx> {
478478 )
479479 }
480480 }
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 (
483483 tables. const_def ( uv. def ) ,
484484 uv. args . stable ( tables) ,
485485 ) ,
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 ! ( ) ,
491491 } ;
492492 let id = tables. intern_ty_const ( tables. tcx . lift ( * self ) . unwrap ( ) ) ;
493493 stable_mir:: ty:: TyConst :: new ( kind, id)
0 commit comments