-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
The implementation of InPlaceIterable for Flatten&FlatMap is unsound #135103
Copy link
Copy link
Open
Labels
A-iteratorsArea: IteratorsArea: IteratorsC-bugCategory: This is a bug.Category: This is a bug.I-unsoundIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessT-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-iteratorsArea: IteratorsArea: IteratorsC-bugCategory: This is a bug.Category: This is a bug.I-unsoundIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessIssue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/SoundnessT-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
(playground)
The above code is analogous to #85322 but applied to
Flatteninstead ofPeekable: cloning the whole iterator doesn't preserve capacity in the innervec::IntoIter. (This also applies toFlatMap.)Introduced in 1.76
cc @the8472, #110353
@rustbot label T-libs, I-unsound, A-iterators