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:
Trevor Gross 2024-08-27 01:46:49 -05:00 committed by GitHub
commit 9c132b29e7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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)