@@ -470,7 +470,7 @@ where
470
470
) -> InterpResult < ' tcx , Option < AllocRef < ' _ , ' tcx , M :: Provenance , M :: AllocExtra , M :: Bytes > > >
471
471
{
472
472
let ( size, _align) = self
473
- . size_and_align_of_mplace ( mplace) ?
473
+ . size_and_align_of_val ( mplace) ?
474
474
. unwrap_or ( ( mplace. layout . size , mplace. layout . align . abi ) ) ;
475
475
// We check alignment separately, and *after* checking everything else.
476
476
// If an access is both OOB and misaligned, we want to see the bounds error.
@@ -486,7 +486,7 @@ where
486
486
) -> InterpResult < ' tcx , Option < AllocRefMut < ' _ , ' tcx , M :: Provenance , M :: AllocExtra , M :: Bytes > > >
487
487
{
488
488
let ( size, _align) = self
489
- . size_and_align_of_mplace ( mplace) ?
489
+ . size_and_align_of_val ( mplace) ?
490
490
. unwrap_or ( ( mplace. layout . size , mplace. layout . align . abi ) ) ;
491
491
// We check alignment separately, and raise that error *after* checking everything else.
492
492
// If an access is both OOB and misaligned, we want to see the bounds error.
@@ -888,11 +888,11 @@ where
888
888
trace ! ( "copy_op: {:?} <- {:?}: {}" , * dest, src, dest. layout( ) . ty) ;
889
889
890
890
let dest = dest. force_mplace ( self ) ?;
891
- let Some ( ( dest_size, _) ) = self . size_and_align_of_mplace ( & dest) ? else {
891
+ let Some ( ( dest_size, _) ) = self . size_and_align_of_val ( & dest) ? else {
892
892
span_bug ! ( self . cur_span( ) , "copy_op needs (dynamically) sized values" )
893
893
} ;
894
894
if cfg ! ( debug_assertions) {
895
- let src_size = self . size_and_align_of_mplace ( & src) ?. unwrap ( ) . 0 ;
895
+ let src_size = self . size_and_align_of_val ( & src) ?. unwrap ( ) . 0 ;
896
896
assert_eq ! ( src_size, dest_size, "Cannot copy differently-sized data" ) ;
897
897
} else {
898
898
// As a cheap approximation, we compare the fixed parts of the size.
@@ -980,7 +980,7 @@ where
980
980
kind : MemoryKind < M :: MemoryKind > ,
981
981
meta : MemPlaceMeta < M :: Provenance > ,
982
982
) -> InterpResult < ' tcx , MPlaceTy < ' tcx , M :: Provenance > > {
983
- let Some ( ( size, align) ) = self . size_and_align_of ( & meta, & layout) ? else {
983
+ let Some ( ( size, align) ) = self . size_and_align_from_meta ( & meta, & layout) ? else {
984
984
span_bug ! ( self . cur_span( ) , "cannot allocate space for `extern` type, size is not known" )
985
985
} ;
986
986
let ptr = self . allocate_ptr ( size, align, kind, AllocInit :: Uninit ) ?;
0 commit comments