rust/library
bors da1e0d1d75 Auto merge of #116218 - tgross35:const-maybe-uninit-zeroed, r=dtolnay
Stabilize `const_maybe_uninit_zeroed` and `const_mem_zeroed`

Make `MaybeUninit::zeroed` and `mem::zeroed` const stable. Newly stable API:

```rust
// core::mem
pub const unsafe fn zeroed<T>() ->;

impl<T> MaybeUninit<T> {
    pub const fn zeroed() -> MaybeUninit<T>;
}
```

This relies on features based around `const_mut_refs`. Per `@RalfJung,` this should be OK since we do not leak any `&mut` to the user.

For this to be possible, intrinsics `assert_zero_valid` and `assert_mem_uninitialized_valid` were made const stable.

Tracking issue: #91850
Zulip discussion: https://rust-lang.zulipchat.com/#narrow/stream/146212-t-compiler.2Fconst-eval/topic/.60const_mut_refs.60.20dependents

r? libs-api
`@rustbot` label -T-libs +T-libs-api +A-const-eval
cc `@RalfJung`  `@oli-obk` `@rust-lang/wg-const-eval`
2023-11-05 05:56:21 +00:00
..
alloc Auto merge of #116218 - tgross35:const-maybe-uninit-zeroed, r=dtolnay 2023-11-05 05:56:21 +00:00
backtrace@e9da96eb45 Update backtrace submodule 2023-10-23 15:11:37 -04:00
core Auto merge of #116218 - tgross35:const-maybe-uninit-zeroed, r=dtolnay 2023-11-05 05:56:21 +00:00
panic_abort
panic_unwind Use pointers instead of usize addresses for landing pads 2023-10-10 09:59:39 +02:00
portable-simd use visibility to check unused imports and delete some stmts 2023-10-22 21:27:46 +08:00
proc_macro rustdoc: remove rust logo from non-Rust crates 2023-10-08 20:17:53 -07:00
profiler_builtins
rtstartup
rustc-std-workspace-alloc
rustc-std-workspace-core
rustc-std-workspace-std
std Bump compiler_builtins to 0.1.103 2023-11-04 13:11:10 -04:00
stdarch@f4528dd6e8 Bump stdarch submodule 2023-10-12 11:11:29 +02:00
sysroot
test rustdoc: remove rust logo from non-Rust crates 2023-10-08 20:17:53 -07:00
unwind Use pointers instead of usize addresses for landing pads 2023-10-10 09:59:39 +02:00