rust/library
Matthias Krüger 98cb33894c
Rollup merge of #89747 - Amanieu:maybeuninit_bytes, r=m-ou-se
Add MaybeUninit::(slice_)as_bytes(_mut)

This adds methods to convert between `MaybeUninit<T>` and a slice of `MaybeUninit<u8>`. This is safe since `MaybeUninit<u8>` can correctly handle padding bytes in any `T`.

These methods are added:
```rust
impl<T> MaybeUninit<T> {
	pub fn as_bytes(&self) -> &[MaybeUninit<u8>];
	pub fn as_bytes_mut(&mut self) -> &mut [MaybeUninit<u8>];
	pub fn slice_as_bytes(this: &[MaybeUninit<T>]) -> &[MaybeUninit<u8>];
	pub fn slice_as_bytes_mut(this: &mut [MaybeUninit<T>]) -> &mut [MaybeUninit<u8>];
}
```
2022-01-20 17:10:30 +01:00
..
alloc Auto merge of #92138 - AngelicosPhosphoros:try_smarter_vec_from_iter_48994_2, r=Mark-Simulacrum 2022-01-20 06:50:14 +00:00
backtrace@b02ed04a7e
core Rollup merge of #89747 - Amanieu:maybeuninit_bytes, r=m-ou-se 2022-01-20 17:10:30 +01:00
panic_abort Switch all libraries to the 2021 edition 2021-12-23 19:03:47 +08:00
panic_unwind Switch all libraries to the 2021 edition 2021-12-23 19:03:47 +08:00
portable-simd Merge commit '533f0fc81ab9ba097779fcd27c8f9ea12261fef5' into psimd 2021-12-17 15:10:53 +08:00
proc_macro Auto merge of #92598 - Badel2:panic-update-hook, r=yaahc 2022-01-16 02:18:42 +00:00
profiler_builtins Switch all libraries to the 2021 edition 2021-12-23 19:03:47 +08:00
rtstartup
rustc-std-workspace-alloc Switch all libraries to the 2021 edition 2021-12-23 19:03:47 +08:00
rustc-std-workspace-core Switch all libraries to the 2021 edition 2021-12-23 19:03:47 +08:00
rustc-std-workspace-std Switch all libraries to the 2021 edition 2021-12-23 19:03:47 +08:00
std Rollup merge of #92124 - AngelicosPhosphoros:remove_extra_alloc_in_cstring_new_35838, r=Mark-Simulacrum 2022-01-19 10:42:15 +01:00
stdarch@11c98f6eb9 Fix stdarch submodule pointing to commit outside tree 2022-01-18 15:25:38 +00:00
test eplace usages of vec![].into_iter with [].into_iter 2022-01-09 14:09:25 +11:00
unwind Switch all libraries to the 2021 edition 2021-12-23 19:03:47 +08:00