about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-12-10 10:46:38 +0000
committerbors <bors@rust-lang.org>2020-12-10 10:46:38 +0000
commit39b841dfe36f90a7cd111e7f0c55f32594f6e578 (patch)
treec9f02b5c949e4bf4e1a4aa7eab89ca3b130f13e2 /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
parente413d89aa706060ddc347e1e06d551ec86d3f471 (diff)
parent077527170bd112d97bdbb288ae8771930bcaa5b7 (diff)
downloadrust-39b841dfe36f90a7cd111e7f0c55f32594f6e578.tar.gz
rust-39b841dfe36f90a7cd111e7f0c55f32594f6e578.zip
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?
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions