libstd: windows: compat: Allow use of attributes
This commit is contained in:
@@ -37,12 +37,14 @@ pub fn store_func(ptr: &AtomicUsize, module: &str, symbol: &str,
|
|||||||
|
|
||||||
macro_rules! compat_fn {
|
macro_rules! compat_fn {
|
||||||
($module:ident: $(
|
($module:ident: $(
|
||||||
|
$(#[$meta:meta])*
|
||||||
pub fn $symbol:ident($($argname:ident: $argtype:ty),*)
|
pub fn $symbol:ident($($argname:ident: $argtype:ty),*)
|
||||||
-> $rettype:ty {
|
-> $rettype:ty {
|
||||||
$($body:expr);*
|
$($body:expr);*
|
||||||
}
|
}
|
||||||
)*) => ($(
|
)*) => ($(
|
||||||
#[allow(unused_variables)]
|
#[allow(unused_variables)]
|
||||||
|
$(#[$meta])*
|
||||||
pub unsafe fn $symbol($($argname: $argtype),*) -> $rettype {
|
pub unsafe fn $symbol($($argname: $argtype),*) -> $rettype {
|
||||||
use crate::sync::atomic::{AtomicUsize, Ordering};
|
use crate::sync::atomic::{AtomicUsize, Ordering};
|
||||||
use crate::mem;
|
use crate::mem;
|
||||||
|
|||||||
Reference in New Issue
Block a user