Vec::drain is unsound with range_bounds_assert_len feature #81157
Labels
A-collections
Area: `std::collection`
C-bug
Category: This is a bug.
I-unsound
Issue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/Soundness
requires-nightly
This issue requires a nightly compiler in some way.
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
Manually implementing
assert_len
can cause unsoundness inVec::drain
. This only happens in nightly, as overridingassert_len
is only possible in nightly releases.The following program will segfault.
Related issues: #76393, #81154.
The text was updated successfully, but these errors were encountered: