rust/library/core/src
Matthias Krüger af0cf34787
Rollup merge of #90896 - jhpratt:stabilize_const_maybe_uninit, r=oli-obk
Stabilize some `MaybeUninit` behavior as const

This stabilizes the `MaybeUninit::as_ptr`, `MaybeUninit::assume_init`, and `MaybeUninit::assume_init_ref` as `const fn`. `MaybeUninit::as_mut_ptr` has been moved to a new flag: `const_maybe_uninit_as_mut_ptr`, which is blocked on #57349. `MaybeUninit::slice_assume_init_ref` can be `const fn` when the method is stabilized in general.

The relevant intrinsic has been stabilized as `const` as well, though this isn't user-visible. Due to the seemingly unrelated feature name I performed `rg const_assert_type` and found no other instances of it being used.

r? `@oli-obk`

`@rustbot` label: +A-const-fn +S-waiting-on-review +T-libs-api
2021-11-28 10:42:38 +01:00
..
alloc Optimize Layout::array. 2021-11-26 19:30:35 +11:00
array Moar #[inline] 2021-11-10 11:57:14 -08:00
char Turn all 0x1b_u8 into '\x1b' or b'\x1b' 2021-11-19 18:14:18 +01:00
convert Make From impls of NonZero integer const. 2021-10-20 12:04:58 +09:00
fmt Use non-generic inner function for pointer formatting 2021-11-26 13:59:57 -05:00
future Add #[must_use] to remaining core functions 2021-10-30 18:21:29 -04:00
hash Apply suggestions from code review 2021-11-23 23:55:05 +01:00
iter Auto merge of #91288 - matthiaskrgr:rollup-yp5h41r, r=matthiaskrgr 2021-11-27 14:29:12 +00:00
macros Document unreachable!() custom panic message 2021-11-11 13:41:21 +00:00
mem Stabilize some MaybeUninit behavior as const 2021-11-28 01:01:47 -05:00
num Stabilize nonzero_is_power_of_two 2021-11-27 13:13:04 -08:00
ops Add generator lang-item 2021-11-23 10:34:16 -08:00
panic Rollup merge of #89897 - jkugelman:must-use-core, r=joshtriplett 2021-10-31 09:20:26 +01:00
prelude Move asm! and global_asm! to core::arch 2021-07-18 18:30:58 -04:00
ptr Fill in tracking issue for feature const_align_offset 2021-11-16 23:58:40 +03:00
slice Auto merge of #90821 - scottmcm:new-slice-reverse, r=Mark-Simulacrum 2021-11-15 20:19:23 +00:00
str Saner formatting for UTF8_CHAR_WIDTH table 2021-11-25 18:18:36 -08:00
stream Apply 16 commits (squashed) 2021-09-25 20:04:35 +02:00
sync Make From impls of NonZero integer const. 2021-10-20 12:04:58 +09:00
task Rollup merge of #89897 - jkugelman:must-use-core, r=joshtriplett 2021-10-31 09:20:26 +01:00
unicode Regenerate tables for Unicode 14.0.0 2021-10-06 17:49:33 -07:00
any.rs Add #[must_use] to remaining core functions 2021-10-30 18:21:29 -04:00
ascii.rs Add #[must_use] to remaining core functions 2021-10-30 18:21:29 -04:00
bool.rs Add primitive documentation to libcore 2021-09-12 02:23:08 +00:00
borrow.rs Fix borrow and deref 2021-03-03 11:23:29 +01:00
cell.rs Add comments regarding superfluous !Sync impls 2021-11-08 13:07:20 -05:00
clone.rs Update Copy/Clone documentation WRT arrays 2021-11-08 13:11:59 -05:00
cmp.rs Add #[repr(i8)] to Ordering 2021-10-03 20:59:54 -07:00
default.rs Add #[must_use] to remaining core functions 2021-10-30 18:21:29 -04:00
ffi.rs Use target_family = "wasm" 2021-11-10 08:35:42 -08:00
hint.rs Stabilize unreachable_unchecked as const fn 2021-10-04 01:04:17 -04:00
internal_macros.rs Added docs to internal_macro const 2021-10-22 10:07:35 +13:00
intrinsics.rs Stabilize some MaybeUninit behavior as const 2021-11-28 01:01:47 -05:00
lazy.rs Make more From impls const 2021-10-18 19:19:28 +09:00
lib.rs Stabilize some MaybeUninit behavior as const 2021-11-28 01:01:47 -05:00
marker.rs Update Copy/Clone documentation WRT arrays 2021-11-08 13:11:59 -05:00
option.rs Rollup merge of #89951 - ojeda:stable-unwrap_unchecked, r=dtolnay 2021-10-31 09:20:27 +01:00
panic.rs Allow panic!("{}", computed_str) in const fn. 2021-09-15 21:56:43 +01:00
panicking.rs Permit const assertions in stdlib 2021-11-08 17:06:00 -05:00
pin.rs Add #[must_use] to remaining core functions 2021-10-30 18:21:29 -04:00
primitive.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
primitive_docs.rs Remove unnecessary doc links 2021-11-19 19:13:53 +03:00
result.rs Stabilize option_result_unwrap_unchecked 2021-10-20 04:03:43 +02:00
time.rs Partially stabilize duration_consts_2 2021-11-22 13:09:08 -05:00
tuple.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
unit.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00