Skip to content

Commit 1dbc84d

Browse files
committed
Remove rustc_global!
1 parent 3fa69c9 commit 1dbc84d

File tree

1 file changed

+0
-30
lines changed
  • src/librustc_data_structures

1 file changed

+0
-30
lines changed

src/librustc_data_structures/sync.rs

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,6 @@
2626
//!
2727
//! `MTLock` is a mutex which disappears if cfg!(parallel_queries) is false.
2828
//!
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-
//!
3429
//! `rustc_erase_owner!` erases a OwningRef owner into Erased or Erased + Send + Sync
3530
//! depending on the value of cfg!(parallel_queries).
3631
@@ -228,31 +223,6 @@ pub fn assert_sync<T: ?Sized + Sync>() {}
228223
pub fn assert_send_val<T: ?Sized + Send>(_t: &T) {}
229224
pub fn assert_send_sync_val<T: ?Sized + Sync + Send>(_t: &T) {}
230225

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-
256226
impl<T: Copy + Debug> Debug for LockCell<T> {
257227
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
258228
f.debug_struct("LockCell")

0 commit comments

Comments
 (0)