The alloc collections make generous use of debug_assert to check their invariants in debug mode. But they don't get run in alloctests!
This led to confusion in #162462 (comment).
Steps to reproduce:
- Add
debug_assert!(false); to the body of VecDeque::new
./x test alloctests runs without failures
The
alloccollections make generous use ofdebug_assertto check their invariants in debug mode. But they don't get run in alloctests!This led to confusion in #162462 (comment).
Steps to reproduce:
debug_assert!(false);to the body ofVecDeque::new./x test alloctestsruns without failures