Skip to content

Commit 0c32ba1

Browse files
Update code to account for extern ABI requirement
1 parent 51b7639 commit 0c32ba1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

std/src/keyword_docs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ mod enum_keyword {}
401401
///
402402
/// ```rust
403403
/// #[no_mangle]
404-
/// pub extern fn callable_from_c(x: i32) -> bool {
404+
/// pub extern "C" fn callable_from_c(x: i32) -> bool {
405405
/// x % 3 == 0
406406
/// }
407407
/// ```

std/src/sys/unix/weak.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ use crate::sync::atomic::{self, AtomicUsize, Ordering};
2828

2929
macro_rules! weak {
3030
(fn $name:ident($($t:ty),*) -> $ret:ty) => (
31-
static $name: crate::sys::weak::Weak<unsafe extern fn($($t),*) -> $ret> =
31+
static $name: crate::sys::weak::Weak<unsafe extern "C" fn($($t),*) -> $ret> =
3232
crate::sys::weak::Weak::new(concat!(stringify!($name), '\0'));
3333
)
3434
}

0 commit comments

Comments
 (0)