mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 02:57:37 +00:00
Add unsafe to extern blocks in style guide
This commit is contained in:
parent
80eb5a8e91
commit
ebf46f7607
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user