Skip to content

Commit db72e41

Browse files
Fix nightly error due to unused_macros lint
1 parent e7072d4 commit db72e41

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

src/dylib.rs

-13
Original file line numberDiff line numberDiff line change
@@ -68,16 +68,3 @@ unsafe fn fetch(handle: *mut c_void, name: *const u8) -> usize {
6868
ptr as usize
6969
}
7070
}
71-
72-
macro_rules! dlsym {
73-
(extern {
74-
$(fn $name:ident($($arg:ident: $t:ty),*) -> $ret:ty;)*
75-
}) => ($(
76-
static $name: ::dylib::Symbol<unsafe extern fn($($t),*) -> $ret> =
77-
::dylib::Symbol {
78-
name: concat!(stringify!($name), "\0"),
79-
addr: ::std::sync::atomic::ATOMIC_USIZE_INIT,
80-
_marker: ::std::marker::PhantomData,
81-
};
82-
)*)
83-
}

src/symbolize/coresymbolication.rs

+13
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,19 @@ impl Symbol {
9595

9696
static CORESYMBOLICATION: Dylib = Dylib { init: ATOMIC_USIZE_INIT };
9797

98+
macro_rules! dlsym {
99+
(extern {
100+
$(fn $name:ident($($arg:ident: $t:ty),*) -> $ret:ty;)*
101+
}) => ($(
102+
static $name: ::dylib::Symbol<unsafe extern fn($($t),*) -> $ret> =
103+
::dylib::Symbol {
104+
name: concat!(stringify!($name), "\0"),
105+
addr: ::std::sync::atomic::ATOMIC_USIZE_INIT,
106+
_marker: ::std::marker::PhantomData,
107+
};
108+
)*)
109+
}
110+
98111
dlsym! {
99112
extern {
100113
fn CSSymbolicatorCreateWithPid(pid: c_int) -> CSTypeRef;

0 commit comments

Comments
 (0)