rust/library/alloc/src/vec
bors 3014e79f9c Auto merge of #143877 - xizheyin:143813, r=scottmcm,saethlin
`std::vec`: Add UB check for `set_len`, `from_raw_parts_in`, and etc.

Closes rust-lang/rust#143813

I noticed that `from_parts_in` do the similar things like `from_raw_parts_in`, so I add the UB check in the last commit. If it is not appropriate, I will remove it.

And I fix a typo in the first commit.

r? `@scottmcm`
2025-07-15 14:47:10 +00:00
..
cow.rs Add #[track_caller] to allocating methods of Vec & VecDeque 2024-09-20 01:20:10 +03:00
drain.rs rename sub_ptr 😅 2025-02-23 23:11:00 +07:00
extract_if.rs Consistent trait bounds for ExtractIf Debug impls 2025-05-05 19:46:46 -07:00
in_place_collect.rs library: Use size_of from the prelude instead of imported 2025-03-06 20:20:38 -08:00
in_place_drop.rs rename sub_ptr 😅 2025-02-23 23:11:00 +07:00
into_iter.rs Implement Iterator::last for vec::IntoIter 2025-05-02 20:08:28 -07:00
is_zero.rs alloc: remove unsound IsZero for raw pointers 2025-01-10 18:48:48 +01:00
mod.rs Auto merge of #143877 - xizheyin:143813, r=scottmcm,saethlin 2025-07-15 14:47:10 +00:00
partial_eq.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
peek_mut.rs add Vec::peek_mut 2025-06-04 18:15:12 -04:00
set_len_on_drop.rs Tune RepeatWith::try_fold and Take::for_each and Vec::extend_trusted 2022-11-24 19:14:19 -08:00
spec_extend.rs Add #[track_caller] to allocating methods of Vec & VecDeque 2024-09-20 01:20:10 +03:00
spec_from_elem.rs Add #[track_caller] to allocating methods of Vec & VecDeque 2024-09-20 01:20:10 +03:00
spec_from_iter.rs Add #[track_caller] to allocating methods of Vec & VecDeque 2024-09-20 01:20:10 +03:00
spec_from_iter_nested.rs Add #[track_caller] to allocating methods of Vec & VecDeque 2024-09-20 01:20:10 +03:00
splice.rs Rename sub_ptr to offset_from_unsigned in docs 2025-04-28 13:58:27 +02:00