about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-09-07 06:52:05 +0000
committerbors <bors@rust-lang.org>2017-09-07 06:52:05 +0000
commitd7d75eff30ff03f607ff0656a50f4be768cfdbc9 (patch)
treef4b1b8c6ed97239450a2e468e0fbda720f005bc9 /src/test
parenta6a9d4c5fd214cb8110482dee2017607e23ccc7b (diff)
parent4e2be14986b022dfdf5efa73293566cc6faf570e (diff)
downloadrust-d7d75eff30ff03f607ff0656a50f4be768cfdbc9.tar.gz
rust-d7d75eff30ff03f607ff0656a50f4be768cfdbc9.zip
Auto merge of #43931 - eddyb:const-local-key, r=alexcrichton
Make the LocalKey facade of thread_local! inlineable cross-crate.

Fixes (almost*) #25088 by changing the `LocalKey` `static` `thread_local!` generates to a `const`.
This can be done because a `LocalKey` value holds no actual TLS data, only function pointers to get at said data, and it could even be made `Copy` without any negative consequences.
The recent stabilization of rvalue promotion to `'static` allows doing this without changing the API.
r? @alexcrichton

*almost because we can't yet inline `__getit` because it breaks on MSVC, see https://github.com/rust-lang/rust/pull/43931#issuecomment-323534214
Diffstat (limited to 'src/test')
-rw-r--r--src/test/compile-fail/macro-local-data-key-priv.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/compile-fail/macro-local-data-key-priv.rs b/src/test/compile-fail/macro-local-data-key-priv.rs
index 3818c8f7754..3ae629cd895 100644
--- a/src/test/compile-fail/macro-local-data-key-priv.rs
+++ b/src/test/compile-fail/macro-local-data-key-priv.rs
@@ -16,5 +16,5 @@ mod bar {
 
 fn main() {
     bar::baz.with(|_| ());
-    //~^ ERROR static `baz` is private
+    //~^ ERROR `baz` is private
 }