@@ -15,9 +15,7 @@ use ty::{Ty, layout};
15
15
use ty:: layout:: { Size , Align , LayoutError } ;
16
16
use rustc_target:: spec:: abi:: Abi ;
17
17
18
- use super :: {
19
- Pointer , Lock , AccessKind
20
- } ;
18
+ use super :: Pointer ;
21
19
22
20
use backtrace:: Backtrace ;
23
21
@@ -274,29 +272,6 @@ pub enum EvalErrorKind<'tcx, O> {
274
272
required : Align ,
275
273
has : Align ,
276
274
} ,
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
- } ,
300
275
ValidationFailure ( String ) ,
301
276
CalledClosureAsFunction ,
302
277
VtableForArgumentlessMethod ,
@@ -360,16 +335,8 @@ impl<'tcx, O> EvalErrorKind<'tcx, O> {
360
335
"pointer offset outside bounds of allocation" ,
361
336
InvalidNullPointerUsage =>
362
337
"invalid use of NULL pointer" ,
363
- MemoryLockViolation { .. } =>
364
- "memory access conflicts with lock" ,
365
- MemoryAcquireConflict { .. } =>
366
- "new memory lock conflicts with existing lock" ,
367
338
ValidationFailure ( ..) =>
368
339
"type validation failed" ,
369
- InvalidMemoryLockRelease { .. } =>
370
- "invalid attempt to release write lock" ,
371
- DeallocatedLockedMemory { .. } =>
372
- "tried to deallocate memory in conflict with a lock" ,
373
340
ReadPointerAsBytes =>
374
341
"a raw memory access tried to access part of a pointer value as raw bytes" ,
375
342
ReadBytesAsPointer =>
@@ -495,22 +462,6 @@ impl<'tcx, O: fmt::Debug> fmt::Debug for EvalErrorKind<'tcx, O> {
495
462
if access { "memory access" } else { "pointer computed" } ,
496
463
ptr. offset. bytes( ) , ptr. alloc_id, allocation_size. bytes( ) )
497
464
} ,
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
- }
514
465
ValidationFailure ( ref err) => {
515
466
write ! ( f, "type validation failed: {}" , err)
516
467
}
0 commit comments