diff --git a/src/SUMMARY.md b/src/SUMMARY.md index b72c01e6..3356883d 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -51,5 +51,5 @@ - [Macro fragment specifiers](rust-2024/macro-fragment-specifiers.md) - [Missing macro fragment specifiers](rust-2024/missing-macro-fragment-specifiers.md) - [Never type fallback change](rust-2024/never-type-fallback.md) - - [`unsafe extern` blocks](rust-2024/unsafe-extern.md) + - [Unsafe `extern` blocks](rust-2024/unsafe-extern.md) - [Unsafe attributes](rust-2024/unsafe-attributes.md) diff --git a/src/rust-2024/unsafe-extern.md b/src/rust-2024/unsafe-extern.md index 01e6b0ce..47221db5 100644 --- a/src/rust-2024/unsafe-extern.md +++ b/src/rust-2024/unsafe-extern.md @@ -1,4 +1,4 @@ -# `unsafe extern` blocks +# Unsafe `extern` blocks 🚧 The 2024 Edition has not yet been released and hence this section is still "under construction". More information may be found in the tracking issue at . @@ -11,13 +11,11 @@ More information may be found in the tracking issue at added the ability in all editions to mark [`extern` blocks] with the `unsafe` keyword.[^RFC3484] Adding the `unsafe` keyword helps to emphasize that it is the responsibility of the author of the `extern` block to ensure that the signatures are correct. If the signatures are not correct, then it may result in undefined behavior. +Rust 1.82 added the ability in all editions to mark [`extern` blocks] with the `unsafe` keyword.[^RFC3484] Adding the `unsafe` keyword helps to emphasize that it is the responsibility of the author of the `extern` block to ensure that the signatures are correct. If the signatures are not correct, then it may result in undefined behavior. The syntax for an unsafe `extern` block looks like this: ```rust -# #![feature(unsafe_extern_blocks)] - unsafe extern "C" { // sqrt (from libm) may be called with any `f64` pub safe fn sqrt(x: f64) -> f64;