@@ -4,7 +4,7 @@ use crate::hir;
44use crate :: hir:: map:: definitions:: DefPathData ;
55use crate :: mir;
66use crate :: ty:: { self , Ty , layout} ;
7- use crate :: ty:: layout:: { Size , Align , LayoutError } ;
7+ use crate :: ty:: layout:: { Size , MemoryPosition , Align , LayoutError } ;
88use crate :: ty:: query:: TyCtxtAt ;
99
1010use backtrace:: Backtrace ;
@@ -438,7 +438,7 @@ pub enum UnsupportedOpInfo<'tcx> {
438438 DeallocatedWrongMemoryKind ( String , String ) ,
439439 ReallocateNonBasePtr ,
440440 DeallocateNonBasePtr ,
441- IncorrectAllocationInformation ( Size , Size , Align , Align ) ,
441+ IncorrectAllocationInformation ( MemoryPosition , MemoryPosition ) ,
442442 HeapAllocZeroBytes ,
443443 HeapAllocNonPowerOfTwoAlignment ( u64 ) ,
444444 ReadFromReturnPointer ,
@@ -484,10 +484,10 @@ impl fmt::Debug for UnsupportedOpInfo<'tcx> {
484484 write ! ( f, "expected primitive type, got {}" , ty) ,
485485 PathNotFound ( ref path) =>
486486 write ! ( f, "cannot find path {:?}" , path) ,
487- IncorrectAllocationInformation ( size , size2 , align , align2 ) =>
487+ IncorrectAllocationInformation ( expect , got ) =>
488488 write ! ( f, "incorrect alloc info: expected size {} and align {}, \
489489 got size {} and align {}",
490- size. bytes( ) , align. bytes( ) , size2 . bytes( ) , align2 . bytes( ) ) ,
490+ expect . size. bytes( ) , expect . align. bytes( ) , got . size . bytes( ) , got . align . bytes( ) ) ,
491491 InvalidMemoryAccess =>
492492 write ! ( f, "tried to access memory through an invalid pointer" ) ,
493493 DanglingPointerDeref =>
0 commit comments