rust/library
bors 0cc00c48d2 Auto merge of #83416 - alexcrichton:const-thread-local, r=sfackler
std: Add a variant of thread locals with const init

This commit adds a variant of the `thread_local!` macro as a new
`thread_local_const_init!` macro which requires that the initialization
expression is constant (e.g. could be stuck into a `const` if so
desired). This form of thread local allows for a more efficient
implementation of `LocalKey::with` both if the value has a destructor
and if it doesn't. If the value doesn't have a destructor then `with`
should desugar to exactly as-if you use `#[thread_local]` given
sufficient inlining.

The purpose of this new form of thread locals is to precisely be
equivalent to `#[thread_local]` on platforms where possible for values
which fit the bill (those without destructors). This should help close
the gap in performance between `thread_local!`, which is safe, relative
to `#[thread_local]`, which is not easy to use in a portable fashion.
2021-04-16 16:36:46 +00:00
..
alloc Rollup merge of #84145 - vojtechkral:vecdeque-binary-search, r=m-ou-se 2021-04-16 14:08:32 +02:00
backtrace@710fc18ddc Update backtrace to 0.3.56 2021-03-25 22:25:34 -06:00
core Auto merge of #84088 - m-ou-se:stabilize-option-insert, r=m-ou-se 2021-04-15 12:37:19 +00:00
panic_abort android: set abort message 2021-04-09 15:33:43 +02:00
panic_unwind Revert "Revert stabilizing integer::BITS." 2021-03-24 22:34:36 +01:00
proc_macro
profiler_builtins Update the minimum external LLVM to 10 2021-03-22 11:33:43 -07:00
rtstartup
rustc-std-workspace-alloc
rustc-std-workspace-core
rustc-std-workspace-std
std std: Add a variant of thread locals with const init 2021-04-16 09:21:38 -07:00
stdarch@19f5459dd0 Update stdarch submodule (to before it switched to const generics) 2021-04-12 09:39:04 -04:00
term
test Auto merge of #82300 - andersk:libtest-id, r=Amanieu 2021-04-12 13:30:30 +00:00
unwind Rollup merge of #82374 - clehner:licenses, r=joshtriplett 2021-03-22 15:21:23 +01:00