rust/library/core
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
..
benches Remove redundant 'static from library crates 2020-10-18 17:25:51 +02:00
src Auto merge of #79621 - usbalbin:constier_maybe_uninit, r=RalfJung 2020-12-10 10:46:38 +00:00
tests Remove unused feature gate 2020-12-06 22:29:13 +01:00
Cargo.toml