@@ -124,7 +124,7 @@ impl<'a, 'mir, 'tcx: 'mir + 'a> EvalContextExt<'tcx, 'mir> for super::MiriEvalCo
124124 if size == 0 {
125125 self . write_null ( dest) ?;
126126 } else {
127- let align = self . tcx . data_layout . pointer_align ;
127+ let align = self . tcx . data_layout . pointer_align . abi ;
128128 let ptr = self . memory_mut ( ) . allocate ( Size :: from_bytes ( size) , align, MiriMemoryKind :: C . into ( ) ) ?;
129129 self . write_scalar ( Scalar :: Ptr ( ptr. with_default_tag ( ) ) , dest) ?;
130130 }
@@ -153,7 +153,7 @@ impl<'a, 'mir, 'tcx: 'mir + 'a> EvalContextExt<'tcx, 'mir> for super::MiriEvalCo
153153 let ptr = self . memory_mut ( )
154154 . allocate (
155155 Size :: from_bytes ( size) ,
156- Align :: from_bytes ( align, align ) . unwrap ( ) ,
156+ Align :: from_bytes ( align) . unwrap ( ) ,
157157 MiriMemoryKind :: Rust . into ( )
158158 ) ?
159159 . with_default_tag ( ) ;
@@ -171,7 +171,7 @@ impl<'a, 'mir, 'tcx: 'mir + 'a> EvalContextExt<'tcx, 'mir> for super::MiriEvalCo
171171 let ptr = self . memory_mut ( )
172172 . allocate (
173173 Size :: from_bytes ( size) ,
174- Align :: from_bytes ( align, align ) . unwrap ( ) ,
174+ Align :: from_bytes ( align) . unwrap ( ) ,
175175 MiriMemoryKind :: Rust . into ( )
176176 ) ?
177177 . with_default_tag ( ) ;
@@ -190,7 +190,7 @@ impl<'a, 'mir, 'tcx: 'mir + 'a> EvalContextExt<'tcx, 'mir> for super::MiriEvalCo
190190 }
191191 self . memory_mut ( ) . deallocate (
192192 ptr,
193- Some ( ( Size :: from_bytes ( old_size) , Align :: from_bytes ( align, align ) . unwrap ( ) ) ) ,
193+ Some ( ( Size :: from_bytes ( old_size) , Align :: from_bytes ( align) . unwrap ( ) ) ) ,
194194 MiriMemoryKind :: Rust . into ( ) ,
195195 ) ?;
196196 }
@@ -208,9 +208,9 @@ impl<'a, 'mir, 'tcx: 'mir + 'a> EvalContextExt<'tcx, 'mir> for super::MiriEvalCo
208208 let new_ptr = self . memory_mut ( ) . reallocate (
209209 ptr,
210210 Size :: from_bytes ( old_size) ,
211- Align :: from_bytes ( align, align ) . unwrap ( ) ,
211+ Align :: from_bytes ( align) . unwrap ( ) ,
212212 Size :: from_bytes ( new_size) ,
213- Align :: from_bytes ( align, align ) . unwrap ( ) ,
213+ Align :: from_bytes ( align) . unwrap ( ) ,
214214 MiriMemoryKind :: Rust . into ( ) ,
215215 ) ?;
216216 self . write_scalar ( Scalar :: Ptr ( new_ptr. with_default_tag ( ) ) , dest) ?;
@@ -394,7 +394,7 @@ impl<'a, 'mir, 'tcx: 'mir + 'a> EvalContextExt<'tcx, 'mir> for super::MiriEvalCo
394394 // +1 for the null terminator
395395 let value_copy = self . memory_mut ( ) . allocate (
396396 Size :: from_bytes ( ( value. len ( ) + 1 ) as u64 ) ,
397- Align :: from_bytes ( 1 , 1 ) . unwrap ( ) ,
397+ Align :: from_bytes ( 1 ) . unwrap ( ) ,
398398 MiriMemoryKind :: Env . into ( ) ,
399399 ) ?. with_default_tag ( ) ;
400400 self . memory_mut ( ) . write_bytes ( value_copy. into ( ) , & value) ?;
@@ -513,7 +513,7 @@ impl<'a, 'mir, 'tcx: 'mir + 'a> EvalContextExt<'tcx, 'mir> for super::MiriEvalCo
513513 }
514514 self . memory_mut ( ) . write_scalar (
515515 key_ptr,
516- key_layout. align ,
516+ key_layout. align . abi ,
517517 Scalar :: from_uint ( key, key_layout. size ) . into ( ) ,
518518 key_layout. size ,
519519 ) ?;
0 commit comments