mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-19 18:34:08 +00:00
Rollup merge of #127922 - spastorino:unsafe-extern-blocks-in-style-guide, r=compiler-errors
Add unsafe to extern blocks in style guide This goes after this is merged: - https://github.com/rust-lang/rust/pull/127921 r? ``@traviscross`` Tracking: - https://github.com/rust-lang/rust/issues/123743
This commit is contained in:
commit
9c132b29e7
@ -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