@@ -15,9 +15,7 @@ use ty::{Ty, layout};
1515use ty:: layout:: { Size , Align , LayoutError } ;
1616use rustc_target:: spec:: abi:: Abi ;
1717
18- use super :: {
19- Pointer , Lock , AccessKind
20- } ;
18+ use super :: Pointer ;
2119
2220use backtrace:: Backtrace ;
2321
@@ -274,29 +272,6 @@ pub enum EvalErrorKind<'tcx, O> {
274272 required : Align ,
275273 has : Align ,
276274 } ,
277- MemoryLockViolation {
278- ptr : Pointer ,
279- len : u64 ,
280- frame : usize ,
281- access : AccessKind ,
282- lock : Lock ,
283- } ,
284- MemoryAcquireConflict {
285- ptr : Pointer ,
286- len : u64 ,
287- kind : AccessKind ,
288- lock : Lock ,
289- } ,
290- InvalidMemoryLockRelease {
291- ptr : Pointer ,
292- len : u64 ,
293- frame : usize ,
294- lock : Lock ,
295- } ,
296- DeallocatedLockedMemory {
297- ptr : Pointer ,
298- lock : Lock ,
299- } ,
300275 ValidationFailure ( String ) ,
301276 CalledClosureAsFunction ,
302277 VtableForArgumentlessMethod ,
@@ -360,16 +335,8 @@ impl<'tcx, O> EvalErrorKind<'tcx, O> {
360335 "pointer offset outside bounds of allocation" ,
361336 InvalidNullPointerUsage =>
362337 "invalid use of NULL pointer" ,
363- MemoryLockViolation { .. } =>
364- "memory access conflicts with lock" ,
365- MemoryAcquireConflict { .. } =>
366- "new memory lock conflicts with existing lock" ,
367338 ValidationFailure ( ..) =>
368339 "type validation failed" ,
369- InvalidMemoryLockRelease { .. } =>
370- "invalid attempt to release write lock" ,
371- DeallocatedLockedMemory { .. } =>
372- "tried to deallocate memory in conflict with a lock" ,
373340 ReadPointerAsBytes =>
374341 "a raw memory access tried to access part of a pointer value as raw bytes" ,
375342 ReadBytesAsPointer =>
@@ -495,22 +462,6 @@ impl<'tcx, O: fmt::Debug> fmt::Debug for EvalErrorKind<'tcx, O> {
495462 if access { "memory access" } else { "pointer computed" } ,
496463 ptr. offset. bytes( ) , ptr. alloc_id, allocation_size. bytes( ) )
497464 } ,
498- MemoryLockViolation { ptr, len, frame, access, ref lock } => {
499- write ! ( f, "{:?} access by frame {} at {:?}, size {}, is in conflict with lock {:?}" ,
500- access, frame, ptr, len, lock)
501- }
502- MemoryAcquireConflict { ptr, len, kind, ref lock } => {
503- write ! ( f, "new {:?} lock at {:?}, size {}, is in conflict with lock {:?}" ,
504- kind, ptr, len, lock)
505- }
506- InvalidMemoryLockRelease { ptr, len, frame, ref lock } => {
507- write ! ( f, "frame {} tried to release memory write lock at {:?}, size {}, but \
508- cannot release lock {:?}", frame, ptr, len, lock)
509- }
510- DeallocatedLockedMemory { ptr, ref lock } => {
511- write ! ( f, "tried to deallocate memory at {:?} in conflict with lock {:?}" ,
512- ptr, lock)
513- }
514465 ValidationFailure ( ref err) => {
515466 write ! ( f, "type validation failed: {}" , err)
516467 }
0 commit comments