]> git.lizzy.rs Git - rust.git/commitdiff
libstd: windows: compat: Allow use of attributes
authorHugo Beauzée-Luyssen <hugo@beauzee.fr>
Mon, 27 May 2019 13:55:06 +0000 (15:55 +0200)
committerHugo Beauzée-Luyssen <hugo@beauzee.fr>
Thu, 25 Jul 2019 19:30:08 +0000 (21:30 +0200)
src/libstd/sys/windows/compat.rs

index 748c1616d1d32304a42e74e20489ffff1f8c657f..544b2087f92e0fb88b13e0e33ee8271105a74f1c 100644 (file)
@@ -37,12 +37,14 @@ pub fn store_func(ptr: &AtomicUsize, module: &str, symbol: &str,
 
 macro_rules! compat_fn {
     ($module:ident: $(
+        $(#[$meta:meta])*
         pub fn $symbol:ident($($argname:ident: $argtype:ty),*)
                                   -> $rettype:ty {
             $($body:expr);*
         }
     )*) => ($(
         #[allow(unused_variables)]
+        $(#[$meta])*
         pub unsafe fn $symbol($($argname: $argtype),*) -> $rettype {
             use crate::sync::atomic::{AtomicUsize, Ordering};
             use crate::mem;