@@ -13,9 +13,8 @@ use rustc_middle::{mir, ty};
1313use rustc_target:: abi:: { self , Abi , Align , HasDataLayout , Size } ;
1414
1515use super :: {
16- alloc_range, from_known_layout, mir_assign_valid_types, AllocId , ConstValue , Frame , InterpCx ,
17- InterpResult , MPlaceTy , Machine , MemPlace , MemPlaceMeta , PlaceTy , Pointer , Projectable ,
18- Provenance , Scalar ,
16+ alloc_range, from_known_layout, mir_assign_valid_types, AllocId , Frame , InterpCx , InterpResult ,
17+ MPlaceTy , Machine , MemPlace , MemPlaceMeta , PlaceTy , Pointer , Projectable , Provenance , Scalar ,
1918} ;
2019
2120/// An `Immediate` represents a single immediate self-contained Rust value.
@@ -702,7 +701,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
702701
703702 pub ( crate ) fn const_val_to_op (
704703 & self ,
705- val_val : ConstValue < ' tcx > ,
704+ val_val : mir :: ConstValue < ' tcx > ,
706705 ty : Ty < ' tcx > ,
707706 layout : Option < TyAndLayout < ' tcx > > ,
708707 ) -> InterpResult < ' tcx , OpTy < ' tcx , M :: Provenance > > {
@@ -715,15 +714,15 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
715714 } ;
716715 let layout = from_known_layout ( self . tcx , self . param_env , layout, || self . layout_of ( ty) ) ?;
717716 let op = match val_val {
718- ConstValue :: Indirect { alloc_id, offset } => {
717+ mir :: ConstValue :: Indirect { alloc_id, offset } => {
719718 // We rely on mutability being set correctly in that allocation to prevent writes
720719 // where none should happen.
721720 let ptr = self . global_base_pointer ( Pointer :: new ( alloc_id, offset) ) ?;
722721 Operand :: Indirect ( MemPlace :: from_ptr ( ptr. into ( ) ) )
723722 }
724- ConstValue :: Scalar ( x) => Operand :: Immediate ( adjust_scalar ( x) ?. into ( ) ) ,
725- ConstValue :: ZeroSized => Operand :: Immediate ( Immediate :: Uninit ) ,
726- ConstValue :: Slice { data, start, end } => {
723+ mir :: ConstValue :: Scalar ( x) => Operand :: Immediate ( adjust_scalar ( x) ?. into ( ) ) ,
724+ mir :: ConstValue :: ZeroSized => Operand :: Immediate ( Immediate :: Uninit ) ,
725+ mir :: ConstValue :: Slice { data, start, end } => {
727726 // We rely on mutability being set correctly in `data` to prevent writes
728727 // where none should happen.
729728 let ptr = Pointer :: new (
0 commit comments