]> git.lizzy.rs Git - rust.git/commitdiff
make TLS state private to TLS module
authorRalf Jung <post@ralfj.de>
Tue, 13 Aug 2019 07:29:01 +0000 (09:29 +0200)
committerRalf Jung <post@ralfj.de>
Tue, 13 Aug 2019 07:29:01 +0000 (09:29 +0200)
src/shims/tls.rs

index d2190bd969e3d04575475fd691579123a60cae9e..e90ace948b7a0c10a56bc60310ae107ab73cb318 100644 (file)
@@ -18,17 +18,17 @@ pub struct TlsEntry<'tcx> {
     /// The data for this key. None is used to represent NULL.
     /// (We normalize this early to avoid having to do a NULL-ptr-test each time we access the data.)
     /// Will eventually become a map from thread IDs to `Scalar`s, if we ever support more than one thread.
-    pub(crate) data: Option<Scalar<Tag>>,
-    pub(crate) dtor: Option<ty::Instance<'tcx>>,
+    data: Option<Scalar<Tag>>,
+    dtor: Option<ty::Instance<'tcx>>,
 }
 
 #[derive(Debug)]
 pub struct TlsData<'tcx> {
     /// The Key to use for the next thread-local allocation.
-    pub(crate) next_key: TlsKey,
+    next_key: TlsKey,
 
     /// pthreads-style thread-local storage.
-    pub(crate) keys: BTreeMap<TlsKey, TlsEntry<'tcx>>,
+    keys: BTreeMap<TlsKey, TlsEntry<'tcx>>,
 }
 
 impl<'tcx> Default for TlsData<'tcx> {