mirror of https://github.com/rust-lang/rfcs.git
Update text/0000-unsafe-extern-blocks.md
Co-authored-by: Waffle Maybe <waffle.lapkin@gmail.com>
This commit is contained in:
parent
7754241faf
commit
2144ac3f15
|
@ -33,7 +33,7 @@ An extern function is declared with a `;` instead of a function body (similar to
|
|||
An extern static value is also declared with a `;` instead of an expression (similar to an associated const of a trait).
|
||||
In both cases, the actual function body or value is provided by whatever external source (which is probably not even written in Rust).
|
||||
|
||||
When an `unsafe extern` block is used, all declarations within that `extern` block *should* have the `unsafe` or `safe` keywords as part of their signature.
|
||||
When an `unsafe extern` block is used, all declarations within that `extern` block *must* have the `unsafe` or `safe` keywords as part of their signature.
|
||||
If one of the two keywords is not explicitly provided, the declaration is assumed to be `unsafe`, and also a warning is generated.
|
||||
The `safe` keyword is a contextual keyword, it is currently only used within `extern` blocks.
|
||||
|
||||
|
|
Loading…
Reference in New Issue