Skip to content

Commit

Permalink
Add clarity about safe and unsafe edition difference.
Browse files Browse the repository at this point in the history
The `safe` and `unsafe` item qualifiers can only be used if `unsafe`
is used (pre-2024). I didn't see this specified elsewhere.
  • Loading branch information
ehuss authored and spastorino committed Aug 6, 2024
1 parent 1072b01 commit a1a6f29
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/items/external-blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ The external block defines its functions and statics in the [value namespace] of

**Edition differences**: Starting in the 2024 edition, the `unsafe` keyword is
required to appear before the `extern` keyword on external blocks. In previous
editions, it is accepted but not required.
editions, it is accepted but not required. The `safe` and `unsafe` item qualifiers
are only allowed if the external block itself is marked as `unsafe`.

## Functions

Expand Down

0 comments on commit a1a6f29

Please sign in to comment.