@@ -63,7 +63,7 @@ pub enum AllocKind {
6363 /// A function allocation (that fn ptrs point to).
6464 Function ,
6565 /// A (symbolic) vtable allocation.
66- Vtable ,
66+ VTable ,
6767 /// A dead allocation.
6868 Dead ,
6969}
@@ -293,7 +293,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
293293 Some ( GlobalAlloc :: Function ( ..) ) => {
294294 err_ub_format ! ( "deallocating {alloc_id:?}, which is a function" )
295295 }
296- Some ( GlobalAlloc :: Vtable ( ..) ) => {
296+ Some ( GlobalAlloc :: VTable ( ..) ) => {
297297 err_ub_format ! ( "deallocating {alloc_id:?}, which is a vtable" )
298298 }
299299 Some ( GlobalAlloc :: Static ( ..) | GlobalAlloc :: Memory ( ..) ) => {
@@ -484,7 +484,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
484484 ( mem, None )
485485 }
486486 Some ( GlobalAlloc :: Function ( ..) ) => throw_ub ! ( DerefFunctionPointer ( id) ) ,
487- Some ( GlobalAlloc :: Vtable ( ..) ) => throw_ub ! ( DerefVtablePointer ( id) ) ,
487+ Some ( GlobalAlloc :: VTable ( ..) ) => throw_ub ! ( DerefVTablePointer ( id) ) ,
488488 None => throw_ub ! ( PointerUseAfterFree ( id) ) ,
489489 Some ( GlobalAlloc :: Static ( def_id) ) => {
490490 assert ! ( self . tcx. is_static( def_id) ) ;
@@ -688,9 +688,9 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
688688 ( alloc. size ( ) , alloc. align , AllocKind :: LiveData )
689689 }
690690 Some ( GlobalAlloc :: Function ( _) ) => bug ! ( "We already checked function pointers above" ) ,
691- Some ( GlobalAlloc :: Vtable ( ..) ) => {
691+ Some ( GlobalAlloc :: VTable ( ..) ) => {
692692 // No data to be accessed here. But vtables are pointer-aligned.
693- return ( Size :: ZERO , self . tcx . data_layout . pointer_align . abi , AllocKind :: Vtable ) ;
693+ return ( Size :: ZERO , self . tcx . data_layout . pointer_align . abi , AllocKind :: VTable ) ;
694694 }
695695 // The rest must be dead.
696696 None => {
@@ -746,11 +746,11 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
746746 trace ! ( "get_ptr_vtable({:?})" , ptr) ;
747747 let ( alloc_id, offset, _tag) = self . ptr_get_alloc_id ( ptr) ?;
748748 if offset. bytes ( ) != 0 {
749- throw_ub ! ( InvalidVtablePointer ( Pointer :: new( alloc_id, offset) ) )
749+ throw_ub ! ( InvalidVTablePointer ( Pointer :: new( alloc_id, offset) ) )
750750 }
751751 match self . tcx . try_get_global_alloc ( alloc_id) {
752- Some ( GlobalAlloc :: Vtable ( ty, trait_ref) ) => Ok ( ( ty, trait_ref) ) ,
753- _ => throw_ub ! ( InvalidVtablePointer ( Pointer :: new( alloc_id, offset) ) ) ,
752+ Some ( GlobalAlloc :: VTable ( ty, trait_ref) ) => Ok ( ( ty, trait_ref) ) ,
753+ _ => throw_ub ! ( InvalidVTablePointer ( Pointer :: new( alloc_id, offset) ) ) ,
754754 }
755755 }
756756
@@ -871,10 +871,10 @@ impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> std::fmt::Debug for DumpAllocs<'a,
871871 Some ( GlobalAlloc :: Function ( func) ) => {
872872 write ! ( fmt, " (fn: {func})" ) ?;
873873 }
874- Some ( GlobalAlloc :: Vtable ( ty, Some ( trait_ref) ) ) => {
874+ Some ( GlobalAlloc :: VTable ( ty, Some ( trait_ref) ) ) => {
875875 write ! ( fmt, " (vtable: impl {trait_ref} for {ty})" ) ?;
876876 }
877- Some ( GlobalAlloc :: Vtable ( ty, None ) ) => {
877+ Some ( GlobalAlloc :: VTable ( ty, None ) ) => {
878878 write ! ( fmt, " (vtable: impl <auto trait> for {ty})" ) ?;
879879 }
880880 Some ( GlobalAlloc :: Static ( did) ) => {
0 commit comments