Skip to content

Commit f381666

Browse files
committed
Fix the missing_abi lint
Recent versions of Rust require the ABI always be specified for `extern` functions, whereas it historically defaulted to `extern "C"`. Fix a few cases where this lint now gets raised by specifying `extern "C"`.
1 parent 8b69878 commit f381666

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/macros.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ cfg_if! {
243243
)*) => ($(
244244
#[inline]
245245
$(#[$attr])*
246-
pub $($constness)* unsafe extern fn $i($($arg: $argty),*) -> $ret
246+
pub $($constness)* unsafe extern "C" fn $i($($arg: $argty),*) -> $ret
247247
$body
248248
)*)
249249
}
@@ -257,7 +257,7 @@ cfg_if! {
257257
)*) => ($(
258258
#[inline]
259259
$(#[$attr])*
260-
pub $($constness)* extern fn $i($($arg: $argty),*) -> $ret
260+
pub $($constness)* extern "C" fn $i($($arg: $argty),*) -> $ret
261261
$body
262262
)*)
263263
}
@@ -285,7 +285,7 @@ cfg_if! {
285285
)*) => ($(
286286
#[inline]
287287
$(#[$attr])*
288-
pub unsafe extern fn $i($($arg: $argty),*) -> $ret
288+
pub unsafe extern "C" fn $i($($arg: $argty),*) -> $ret
289289
$body
290290
)*)
291291
}
@@ -299,7 +299,7 @@ cfg_if! {
299299
)*) => ($(
300300
#[inline]
301301
$(#[$attr])*
302-
pub extern fn $i($($arg: $argty),*) -> $ret
302+
pub extern "C" fn $i($($arg: $argty),*) -> $ret
303303
$body
304304
)*)
305305
}

0 commit comments

Comments
 (0)