You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
EriKWDev opened this issue
Jan 18, 2025
· 1 comment
· Fixed by #135728
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsT-libsRelevant to the library team, which will review and decide on the PR/issue.
rustlib/src/rust/library/alloc/src/vec/mod.rs on pub fn drain<R>(&mut self, range: R) -> Drain<'_, T, A>, line 2603 in stable 1.84.0 (9fc6b4312 2025-01-07)
Summary
/// Removes the specified range from the vector in bulk, returning all
/// removed elements as an iterator. If the iterator is dropped before
/// being fully consumed, it drops the remaining removed elements.
"returning all removed elements as an iterator" remains ambiguous on the order of the elements.
I assume drain will continue to yield the items in the range order so could this be a documented guarantee?
The text was updated successfully, but these errors were encountered:
EriKWDev
added
the
A-docs
Area: Documentation for any part of the project, including the compiler, standard library, and tools
label
Jan 18, 2025
jieyouxu
added
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
and removed
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
labels
Jan 19, 2025
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsT-libsRelevant to the library team, which will review and decide on the PR/issue.
Location
rustlib/src/rust/library/alloc/src/vec/mod.rs
onpub fn drain<R>(&mut self, range: R) -> Drain<'_, T, A>
, line2603
in stable1.84.0 (9fc6b4312 2025-01-07)
Summary
"returning all removed elements as an iterator" remains ambiguous on the order of the elements.
I assume
drain
will continue to yield the items in the range order so could this be a documented guarantee?The text was updated successfully, but these errors were encountered: