Skip to content

Commit

Permalink
Rollup merge of rust-lang#127922 - spastorino:unsafe-extern-blocks-in…
Browse files Browse the repository at this point in the history
…-style-guide, r=compiler-errors

Add unsafe to extern blocks in style guide

This goes after this is merged:

- rust-lang#127921

r? `@traviscross`

Tracking:

- rust-lang#123743
  • Loading branch information
workingjubilee authored Aug 27, 2024
2 parents 9d08d04 + ebf46f7 commit e9f1c3d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/doc/style-guide/src/items.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit e9f1c3d

Please sign in to comment.