rust/compiler/rustc_mir/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
..
borrow_check use .contains() or .any() instead of find(x).is_some() (clippy::search_is_some) 2020-12-08 20:27:48 +01:00
const_eval Auto merge of #79621 - usbalbin:constier_maybe_uninit, r=RalfJung 2020-12-10 10:46:38 +00:00
dataflow compiler: fold by value 2020-11-16 22:34:57 +01:00
interpret Auto merge of #79621 - usbalbin:constier_maybe_uninit, r=RalfJung 2020-12-10 10:46:38 +00:00
monomorphize Remove ForeignMod struct. 2020-11-26 21:32:27 +01:00
transform Rollup merge of #79818 - richkadel:llvm-coverage-counters-2.1.0, r=tmandry 2020-12-09 13:38:27 -08:00
util Coverage tests for remaining TerminatorKinds and async, improve Assert 2020-12-03 09:50:09 -08:00
lib.rs TypeVisitor: use ControlFlow in rustc_{mir,privacy,traits,typeck} 2020-10-30 12:27:44 +01:00
shim.rs Support building clone shims for arrays with generic size 2020-11-21 00:00:00 +00:00