libstd: windows: compat: Allow use of attributes

This commit is contained in:
Hugo Beauzée-Luyssen 2019-05-27 15:55:06 +02:00
parent 5af318bd56
commit e34bcdbc57

View 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;