Commits
Click on a commit to change the comparison rangefix(allocator): remove `Clone` impl from `Vec` (#13040)
`Vec::clone` method is unsound, for the same reasons as `Vec::bump` is (#13039).
`clone` only takes a `&self` and then uses it to access the `&Bump` contained in `Vec`, and allocates into that arena. Because `Vec` is `Sync`, that can result in 2 threads allocating into same `Bump` simultaneously, which is UB.
`Clone` is of limited use, because usually usually the contents of the `Vec` aren't `Clone`. We have `CloneIn` trait for this purpose.
We don't currently use `Clone` anywhere, so we can remove it.3 months ago
by overlookmotel