rust/library/alloc/src/vec
Yuki Okushi 290117f7d9
Rollup merge of #82564 - WaffleLapkin:revert_spare_mut, r=RalfJung
Revert `Vec::spare_capacity_mut` impl to prevent pointers invalidation

The implementation was changed in #79015.

Later it was [pointed out](https://github.com/rust-lang/rust/issues/81944#issuecomment-782849785) that the implementation invalidates pointers to the buffer (initialized elements) by creating a unique reference to the buffer. This PR reverts the implementation.

r? ```@RalfJung```
2021-03-04 20:01:06 +09:00
..
cow.rs style: applying Rust style 2020-12-29 14:03:30 +00:00
drain.rs style: applying Rust style 2020-12-29 14:03:30 +00:00
drain_filter.rs style: applying Rust style 2020-12-29 14:03:30 +00:00
in_place_drop.rs style: applying Rust style 2020-12-29 14:03:30 +00:00
into_iter.rs Turn may_have_side_effect into an associated constant 2021-02-15 17:36:29 +01:00
is_zero.rs style: applying Rust style 2020-12-29 14:03:30 +00:00
mod.rs Rollup merge of #82564 - WaffleLapkin:revert_spare_mut, r=RalfJung 2021-03-04 20:01:06 +09:00
partial_eq.rs style: applying Rust style 2020-12-29 14:03:30 +00:00
set_len_on_drop.rs refactor: moved SetLenOnDrop to set_len_on_drop 2020-12-29 14:03:30 +00:00
source_iter_marker.rs style: applying Rust style 2020-12-29 14:03:30 +00:00
spec_extend.rs style: applying Rust style 2020-12-29 14:03:30 +00:00
spec_from_elem.rs style: applying Rust style 2020-12-29 14:03:30 +00:00
spec_from_iter.rs fix: moved import into #[cfg(test)] 2020-12-29 14:03:30 +00:00
spec_from_iter_nested.rs Add SpecFromIter ref in the comments directly 2021-01-19 18:28:33 +01:00
splice.rs style: applying Rust style 2020-12-29 14:03:30 +00:00