diff options
| author | bors <bors@rust-lang.org> | 2020-07-30 12:52:41 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-07-30 12:52:41 +0000 |
| commit | 21867225a74d3b07c2b65e32c67f45197db36896 (patch) | |
| tree | f903229ee97368d43dac57f42e536ba2a4d9b102 /src/rustllvm/RustWrapper.cpp | |
| parent | 1ce0cf070e0f5c1157976fc1106eded67bac2050 (diff) | |
| parent | 88fd4943a65fe7b18c0468255c54f9dee591dd1b (diff) | |
| download | rust-21867225a74d3b07c2b65e32c67f45197db36896.tar.gz rust-21867225a74d3b07c2b65e32c67f45197db36896.zip | |
Auto merge of #74930 - ecstatic-morse:const-size-align-of-val, r=oli-obk
Make `mem::size_of_val` and `mem::align_of_val` unstably const Implements #46571 but does not stabilize it. I wanted this while working on something today. The only reason not to immediately stabilize are concerns around [custom DSTs](https://github.com/rust-lang/rust/issues/46571#issuecomment-387669352). That proposal has made zero progress in the last two years and const eval is rich enough to support pretty much any user-defined `len` function as long as nightly features are allowed (`raw_ptr_deref`). Currently, this raises a `const_err` lint when passed an `extern type`. r? @oli-obk cc @rust-lang/wg-const-eval
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
