Skip to content

Commit 60631ce

Browse files
committed
Clarify what we're replacing in the Reference
This RFC suggests replacements to text within the Rust Reference. Let's clarify where those sections are. (Thanks to Waffle for raising this point.)
1 parent 176d73f commit 60631ce

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

text/0000-unsafe-extern-blocks.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,11 @@ The grammar of the language is updated so that:
7272
* Editions >= 2024 *must* prefix all `extern` blocks with `unsafe`.
7373
* Editions < 2024 *should* prefix `extern` blocks with `unsafe`, this is a warn-by-default compatibility lint when `unsafe` is missing.
7474

75-
Replace the *Functions* and *Statics* sections with the following:
75+
This RFC replaces the *["functions"][]* and *["statics"][]* sections in the [external blocks][] chapter of the Rust Reference with the following:
76+
77+
["functions"]: https://doc.rust-lang.org/nightly/reference/items/external-blocks.html#functions
78+
["statics"]: https://doc.rust-lang.org/nightly/reference/items/external-blocks.html#statics
79+
[external blocks]: https://doc.rust-lang.org/nightly/reference/items/external-blocks.html
7680

7781
### Functions
7882
Functions within external blocks are declared in the same way as other Rust functions, with the exception that they must not have a body and are instead terminated by a semicolon. Patterns are not allowed in parameters, only IDENTIFIER or _ may be used. The function qualifiers `const`, `async`, and `extern` are not allowed. If the function is unsafe to call, then the function should use the `unsafe` qualifier. If the function is safe to call, then the function should use the `safe` qualifier (a contextual keyword). Functions that are not qualified as `unsafe` or `safe` are assumed to be `unsafe`.

0 commit comments

Comments
 (0)