Vec::extend_from_slice
’s documentation forgot about the difference of T: Clone
vs. T: Copy
bounds.
#97119
Labels
A-docs
Area: documentation for any part of the project, including the compiler, standard library, and tools
A-slice
Area: [T]
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
Quoting from https://doc.rust-lang.org/nightly/std/vec/struct.Vec.html#method.extend_from_slice
But
Vec::extend_from_slice
supports&[T]
forT: Clone
, whereasVec::extend
only supportsimpl Iterator<Item = &T>
ifT: Copy
, so it’s not the same.The text was updated successfully, but these errors were encountered: