Skip to content

Commit e1588d5

Browse files
committed
guide: use "C" in extern items
1 parent 6c702c4 commit e1588d5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

guide/items.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,3 +110,10 @@ Use `{}` for the full definition of the macro.
110110
macro_rules! foo {
111111
}
112112
```
113+
114+
115+
### extern items
116+
117+
When writing extern items (such as `extern "C" fn`), always be explicit about
118+
the ABI. For example, write `extern "C" fn foo ...`, not `extern fn foo ...`, or
119+
`extern "C" { ... }.

0 commit comments

Comments
 (0)