File tree 1 file changed +0
-22
lines changed
1 file changed +0
-22
lines changed Original file line number Diff line number Diff line change @@ -356,23 +356,6 @@ impl<'tcx> Stack {
356
356
Ok ( ( ) )
357
357
}
358
358
359
- /// `reborrow` helper function: test that the stack invariants are still maintained.
360
- fn test_invariants ( & self ) {
361
- let mut saw_shared_read_only = false ;
362
- for item in self . borrows . iter ( ) {
363
- match item. perm {
364
- Permission :: SharedReadOnly => {
365
- saw_shared_read_only = true ;
366
- }
367
- // Otherwise, if we saw one before, that's a bug.
368
- perm if saw_shared_read_only => {
369
- bug ! ( "Found {:?} on top of a SharedReadOnly!" , perm) ;
370
- }
371
- _ => { }
372
- }
373
- }
374
- }
375
-
376
359
/// Derived a new pointer from one with the given tag.
377
360
/// `weak` controls whether this operation is weak or strong: weak granting does not act as
378
361
/// an access, and they add the new item directly on top of the one it is derived
@@ -428,11 +411,6 @@ impl<'tcx> Stack {
428
411
self . borrows . insert ( new_idx, new) ;
429
412
}
430
413
431
- // Make sure that after all this, the stack's invariant is still maintained.
432
- if cfg ! ( debug_assertions) {
433
- self . test_invariants ( ) ;
434
- }
435
-
436
414
Ok ( ( ) )
437
415
}
438
416
}
You can’t perform that action at this time.
0 commit comments