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
..
2023-04-16 11:38:52 +00:00
2022-10-08 11:48:53 +00:00
2023-08-13 13:07:53 -06:00
2023-10-02 08:35:08 +02:00
2023-04-26 02:10:22 -04:00
2023-04-16 11:38:52 +00:00
2023-04-16 11:38:52 +00:00
2023-04-16 11:38:52 +00:00
2023-04-16 11:38:52 +00:00
2023-05-30 08:00:10 -04:00
2023-04-16 11:38:52 +00:00
2023-04-16 11:38:52 +00:00
2023-08-13 13:07:53 -06:00
2023-07-03 14:05:55 +02:00
2023-10-25 22:35:12 +00:00
2023-09-23 14:23:51 -03:00
2023-07-12 21:38:55 -04:00
2023-11-04 15:27:25 -04:00
2023-04-16 11:38:52 +00:00
2022-09-27 19:23:52 +00:00
2022-08-20 12:49:20 -04:00
2022-12-30 14:00:42 +01:00
2023-01-02 10:33:23 -08:00