@@ -13,9 +13,8 @@ use rustc_middle::{mir, ty};
13
13
use rustc_target:: abi:: { self , Abi , Align , HasDataLayout , Size } ;
14
14
15
15
use 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 ,
19
18
} ;
20
19
21
20
/// 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> {
702
701
703
702
pub ( crate ) fn const_val_to_op (
704
703
& self ,
705
- val_val : ConstValue < ' tcx > ,
704
+ val_val : mir :: ConstValue < ' tcx > ,
706
705
ty : Ty < ' tcx > ,
707
706
layout : Option < TyAndLayout < ' tcx > > ,
708
707
) -> InterpResult < ' tcx , OpTy < ' tcx , M :: Provenance > > {
@@ -715,15 +714,15 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
715
714
} ;
716
715
let layout = from_known_layout ( self . tcx , self . param_env , layout, || self . layout_of ( ty) ) ?;
717
716
let op = match val_val {
718
- ConstValue :: Indirect { alloc_id, offset } => {
717
+ mir :: ConstValue :: Indirect { alloc_id, offset } => {
719
718
// We rely on mutability being set correctly in that allocation to prevent writes
720
719
// where none should happen.
721
720
let ptr = self . global_base_pointer ( Pointer :: new ( alloc_id, offset) ) ?;
722
721
Operand :: Indirect ( MemPlace :: from_ptr ( ptr. into ( ) ) )
723
722
}
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 } => {
727
726
// We rely on mutability being set correctly in `data` to prevent writes
728
727
// where none should happen.
729
728
let ptr = Pointer :: new (
0 commit comments