|
26 | 26 | //!
|
27 | 27 | //! `MTLock` is a mutex which disappears if cfg!(parallel_queries) is false.
|
28 | 28 | //!
|
29 |
| -//! `rustc_global!` gives us a way to declare variables which are intended to be |
30 |
| -//! global for the current rustc session. This currently maps to thread-locals, |
31 |
| -//! since rustdoc uses the rustc libraries in multiple threads. |
32 |
| -//! These globals should eventually be moved into the `Session` structure. |
33 |
| -//! |
34 | 29 | //! `rustc_erase_owner!` erases a OwningRef owner into Erased or Erased + Send + Sync
|
35 | 30 | //! depending on the value of cfg!(parallel_queries).
|
36 | 31 |
|
@@ -228,31 +223,6 @@ pub fn assert_sync<T: ?Sized + Sync>() {}
|
228 | 223 | pub fn assert_send_val<T: ?Sized + Send>(_t: &T) {}
|
229 | 224 | pub fn assert_send_sync_val<T: ?Sized + Sync + Send>(_t: &T) {}
|
230 | 225 |
|
231 |
| -#[macro_export] |
232 |
| -#[allow_internal_unstable] |
233 |
| -macro_rules! rustc_global { |
234 |
| - // empty (base case for the recursion) |
235 |
| - () => {}; |
236 |
| - |
237 |
| - // process multiple declarations |
238 |
| - ($(#[$attr:meta])* $vis:vis static $name:ident: $t:ty = $init:expr; $($rest:tt)*) => ( |
239 |
| - thread_local!($(#[$attr])* $vis static $name: $t = $init); |
240 |
| - rustc_global!($($rest)*); |
241 |
| - ); |
242 |
| - |
243 |
| - // handle a single declaration |
244 |
| - ($(#[$attr:meta])* $vis:vis static $name:ident: $t:ty = $init:expr) => ( |
245 |
| - thread_local!($(#[$attr])* $vis static $name: $t = $init); |
246 |
| - ); |
247 |
| -} |
248 |
| - |
249 |
| -#[macro_export] |
250 |
| -macro_rules! rustc_access_global { |
251 |
| - ($name:path, $callback:expr) => { |
252 |
| - $name.with($callback) |
253 |
| - } |
254 |
| -} |
255 |
| - |
256 | 226 | impl<T: Copy + Debug> Debug for LockCell<T> {
|
257 | 227 | fn fmt(&self, f: &mut Formatter) -> fmt::Result {
|
258 | 228 | f.debug_struct("LockCell")
|
|
0 commit comments