You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update edition differences for unsafe extern blocks
This follows the style that the main text should describe the current
edition, and that edition differences are in a blockquote, and they
describe what is different.
Copy file name to clipboardExpand all lines: src/items/external-blocks.md
+5-4
Original file line number
Diff line number
Diff line change
@@ -33,10 +33,11 @@ Calling functions or accessing statics that are declared in external blocks is o
33
33
r[items.extern.namespace]
34
34
The external block defines its functions and statics in the [value namespace] of the module or block where it is located.
35
35
36
-
**Edition differences**: Starting in the 2024 edition, the `unsafe` keyword is
37
-
required to appear before the `extern` keyword on external blocks. In previous
38
-
editions, it is accepted but not required. The `safe` and `unsafe` item qualifiers
39
-
are only allowed if the external block itself is marked as `unsafe`.
36
+
r[items.extern.unsafe-required]
37
+
The `unsafe` keyword is semantically required to appear before the `extern` keyword on external blocks.
38
+
39
+
r[items.extern.edition2024]
40
+
> **Edition differences**: Prior to the 2024 edition, the `unsafe` keyword is optional. The `safe` and `unsafe` item qualifiers are only allowed if the external block itself is marked as `unsafe`.
Copy file name to clipboardExpand all lines: src/unsafe-keyword.md
+2-1
Original file line number
Diff line number
Diff line change
@@ -81,7 +81,8 @@ r[unsafe.extern]
81
81
82
82
The programmer who declares an [external block] must assure that the signatures of the items contained within are correct. Failing to do so may lead to undefined behavior. That this obligation has been met is indicated by writing `unsafe extern`.
83
83
84
-
**Edition differences**: Prior to edition 2024, `extern` blocks were allowed without being qualified as `unsafe`.
84
+
r[unsafe.extern.edition2024]
85
+
> **Edition differences**: Prior to edition 2024, `extern` blocks were allowed without being qualified as `unsafe`.
0 commit comments