Add diagnostic items for macros

This commit is contained in:
Alex Macleod
2022-01-06 14:50:46 +00:00
parent f1ce0e6a00
commit 7ea03db04a
5 changed files with 62 additions and 0 deletions

View File

@@ -142,6 +142,7 @@ impl<T: 'static> fmt::Debug for LocalKey<T> {
/// [`std::thread::LocalKey`]: crate::thread::LocalKey
#[macro_export]
#[stable(feature = "rust1", since = "1.0.0")]
#[cfg_attr(not(test), rustc_diagnostic_item = "thread_local_macro")]
#[allow_internal_unstable(thread_local_internals)]
macro_rules! thread_local {
// empty (base case for the recursion)