Add unsafe to extern blocks in style guide

This commit is contained in:
Santiago Pastorino 2024-07-18 12:44:59 -03:00
parent 80eb5a8e91
commit ebf46f7607
No known key found for this signature in database
GPG Key ID: 8131A24E0C79EFAF

View File

@ -449,8 +449,8 @@ entries, format it across multiple lines as with a type alias.
## extern items
When writing extern items (such as `extern "C" fn`), always specify the ABI.
For example, write `extern "C" fn foo ...`, not `extern fn foo ...`, or
`extern "C" { ... }`.
For example, write `extern "C" fn foo ...` or `unsafe extern "C" { ...}`
and avoid `extern fn foo ...` and `unsafe extern { ... }`.
## Imports (`use` statements)