rust/library
bors 21867225a7 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
2020-07-30 12:52:41 +00:00
..
alloc Rollup merge of #74902 - rust-lang:into_raw_non_null, r=dtolnay 2020-07-29 16:38:28 -07:00
core Auto merge of #74930 - ecstatic-morse:const-size-align-of-val, r=oli-obk 2020-07-30 12:52:41 +00:00
panic_abort
panic_unwind
proc_macro
profiler_builtins
rtstartup
rustc-std-workspace-alloc
rustc-std-workspace-core
rustc-std-workspace-std
std Rollup merge of #74742 - poliorcetics:ip-addr-remove-rejected-errata, r=nikomatsakis 2020-07-29 16:38:19 -07:00
stdarch@311d56cd91 Update stdarch submodule 2020-07-28 09:41:09 -07:00
term
test
unwind