rust/library/core/tests
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
..
fmt Update format_args!() test to account for inlining. 2023-03-16 11:21:50 +01:00
hash fix library and rustdoc tests 2023-04-16 11:38:52 +00:00
iter optimize zipping over array iterators 2023-10-06 18:33:25 +02:00
net Add tests for SocketAddrV6 ordering with scope_id and flowinfo 2023-10-15 12:25:58 +00:00
num use visibility to check unused imports and delete some stmts 2023-10-22 21:27:46 +08:00
ops
panic
alloc.rs
any.rs core/any: remove Provider trait 2023-08-13 13:07:53 -06:00
array.rs MIRI -> Miri 2023-10-02 08:35:08 +02:00
ascii.rs
asserting.rs Spelling library/ 2023-04-26 02:10:22 -04:00
atomic.rs fix library and rustdoc tests 2023-04-16 11:38:52 +00:00
bool.rs fix library and rustdoc tests 2023-04-16 11:38:52 +00:00
cell.rs fix library and rustdoc tests 2023-04-16 11:38:52 +00:00
char.rs fix library and rustdoc tests 2023-04-16 11:38:52 +00:00
clone.rs Bump to latest beta compiler 2023-05-30 08:00:10 -04:00
cmp.rs fix library and rustdoc tests 2023-04-16 11:38:52 +00:00
const_ptr.rs
convert.rs fix library and rustdoc tests 2023-04-16 11:38:52 +00:00
error.rs core/any: remove Provider trait 2023-08-13 13:07:53 -06:00
future.rs enable test_join test in Miri 2023-07-03 14:05:55 +02:00
intrinsics.rs
lazy.rs Rollup merge of #110419 - jsoref:spelling-library, r=jyn514 2023-04-26 18:51:41 +02:00
lib.rs Stabilize [const_]pointer_byte_offsets 2023-10-25 22:35:12 +00:00
macros.rs Add the cfg_match! macro 2023-09-23 14:23:51 -03:00
manually_drop.rs Flip cfg's for bootstrap bump 2023-07-12 21:38:55 -04:00
mem.rs Stabilize const_maybe_uninit_zeroed 2023-11-04 15:27:25 -04:00
nonzero.rs Implement Neg for signed non-zero integers. 2023-04-20 14:27:29 +09:00
ops.rs
option.rs fix library and rustdoc tests 2023-04-16 11:38:52 +00:00
panic.rs
pattern.rs
pin_macro.rs
pin.rs
ptr.rs Extend unused_must_use to cover block exprs 2023-06-15 17:59:13 +08:00
result.rs
simd.rs
slice.rs Auto merge of #112818 - Benjamin-L:add-slice_split_once, r=cuviper 2023-10-11 08:19:13 +00:00
str_lossy.rs
str.rs
task.rs
time.rs Fix implementation of Duration::checked_div 2023-07-30 04:00:02 -04:00
tuple.rs
unicode.rs
waker.rs