rust/library/core/src
bors 39b841dfe3 Auto merge of #79621 - usbalbin:constier_maybe_uninit, r=RalfJung
Constier maybe uninit

I was playing around trying to make `[T; N]::zip()` in #79451 be `const fn`. One of the things I bumped into was `MaybeUninit::assume_init`. Is there any reason for the intrinsic `assert_inhabited<T>()` and therefore `MaybeUninit::assume_init` not being `const`?

---

I have as best as I could tried to follow the instruction in [library/core/src/intrinsics.rs](https://github.com/rust-lang/rust/blob/master/library/core/src/intrinsics.rs#L11). I have no idea what I am doing but it seems to compile after some slight changes after the copy paste. Is this anywhere near how this should be done?

Also any ideas for name of the feature gate? I guess `const_maybe_assume_init` is quite misleading since I have added some more methods. Should I add test? If so what should be tested?
2020-12-10 10:46:38 +00:00
..
alloc Rename AllocRef to Allocator and (de)alloc to (de)allocate 2020-12-04 14:47:15 +01:00
array Make as{_mut,}_slice on array::IntoIter public 2020-11-19 08:28:49 +01:00
char Back to #method for links on char 2020-11-30 21:18:56 +01:00
convert Rollup merge of #77339 - fusion-engineering-forks:tryfrom-nonzero-to-nonzero, r=dtolnay 2020-10-23 18:26:16 +09:00
fmt Use more std:: instead of core:: in docs for consistency, add more intra doc links 2020-12-02 00:41:53 +01:00
future Use more std:: instead of core:: in docs for consistency, add more intra doc links 2020-12-02 00:41:53 +01:00
hash fix aliasing issues in SipHasher 2020-10-31 16:26:06 +01:00
iter Intra doc links for iterator adapters 2020-11-30 21:18:55 +01:00
macros Clean up core macros documentation 2020-11-23 11:28:25 -08:00
mem Make write and slice_as_[mut_]_ptr const 2020-12-08 00:07:34 +01:00
num Fix several broken links in doc that used the wrong qualifier or Self:: 2020-11-30 21:21:15 +01:00
ops small TypeVisitor refactor 2020-12-07 15:52:59 +01:00
prelude mv std libs to library/ 2020-07-27 19:51:13 -05:00
ptr Rename AllocRef to Allocator and (de)alloc to (de)allocate 2020-12-04 14:47:15 +01:00
slice Auto merge of #76688 - yokodake:patch-2, r=kodrAus 2020-11-25 02:49:28 +00:00
str Add a doctest example of str::split on a slice of chars 2020-12-02 08:54:42 -08:00
sync Cast pointers to usize before passing them to atomic operations as some platforms do not support atomic operations on pointers. 2020-11-29 12:58:03 +00:00
task Use more std:: instead of core:: in docs for consistency, add more intra doc links 2020-12-02 00:41:53 +01:00
unicode Privatize some of libcore unicode_internals 2020-12-07 16:16:42 +03:00
any.rs update tracking issue for const_type_id 2020-09-24 09:00:04 +10:00
ascii.rs Fixed some intra-docs links in library/core 2020-09-18 07:49:29 +08:00
bool.rs Stabilise then 2020-11-22 13:45:14 +00:00
borrow.rs Remove AsRef link as it is in the prelude 2020-08-10 20:29:20 +02:00
cell.rs Fix several broken links in doc that used the wrong qualifier or Self:: 2020-11-30 21:21:15 +01:00
clone.rs Improve readability 2020-09-01 19:56:32 +02:00
cmp.rs Auto merge of #77872 - Xaeroxe:stabilize-clamp, r=scottmcm 2020-11-22 10:50:04 +00:00
default.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
ffi.rs Properly define va_arg and va_list for aarch64-apple-darwin 2020-10-25 21:37:01 -04:00
hint.rs Stabilize hint::spin_loop 2020-11-06 23:41:55 +08:00
internal_macros.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
intrinsics.rs Auto merge of #79621 - usbalbin:constier_maybe_uninit, r=RalfJung 2020-12-10 10:46:38 +00:00
lazy.rs Capitalize safety comments 2020-09-08 22:26:44 -04:00
lib.rs Auto merge of #79621 - usbalbin:constier_maybe_uninit, r=RalfJung 2020-12-10 10:46:38 +00:00
marker.rs Auto merge of #77893 - petertodd:2020-impl-default-for-phantompinned, r=dtolnay 2020-11-23 07:00:30 +00:00
option.rs add tracking issue number to option_insert feature gate 2020-10-23 11:44:58 +02:00
panic.rs Use more std:: instead of core:: in docs for consistency, add more intra doc links 2020-12-02 00:41:53 +01:00
panicking.rs Bump bootstrap compiler version 2020-11-19 19:23:36 -05:00
pin.rs Add tracking issue number for pin_static_ref. 2020-10-21 16:30:41 +02:00
primitive.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
raw.rs Use intra-doc-links in core::{raw, ffi, pin} 2020-08-22 22:25:27 +02:00
result.rs Use intra-doc links for links to module-level docs 2020-10-12 19:22:47 -07:00
time.rs Remove Duration::MIN entirely 2020-10-27 15:48:58 -07: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