Unsound Debug impl for collections::linked_list::IterMut #85813
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
P-critical
Critical priority
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
(playground)
@rustbot label T-libs-impl, A-collections
Caused by violation of safety invariant as documented in
IterMut
yet
Debug
implementation doeshttps://doc.rust-lang.org/nightly/src/alloc/collections/linked_list.rs.html#79
I’m not sure where the
list
field is really used at all, so maybe it can be replaced by a markermarker: PhantomData<&'a mut Node<T>>
, similar tolinked_list::Iter
’s implementation.The text was updated successfully, but these errors were encountered: