From 7916e1cfeafc29e8ad6e1991451008ba710346b4 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Mon, 19 Aug 2024 08:36:58 -0700 Subject: [PATCH] Update for unsafe attributes stabilization --- src/rust-2024/unsafe-attributes.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/rust-2024/unsafe-attributes.md b/src/rust-2024/unsafe-attributes.md index 58c6973b..c3d2ad47 100644 --- a/src/rust-2024/unsafe-attributes.md +++ b/src/rust-2024/unsafe-attributes.md @@ -16,10 +16,9 @@ More information may be found in the tracking issue at added the ability in all editions to mark certain attributes as `unsafe` to indicate that they have soundness requirements that must be upheld.[^RFC3325] The syntax for an unsafe attribute looks like this: +Rust 1.82 added the ability in all editions to mark certain attributes as `unsafe` to indicate that they have soundness requirements that must be upheld.[^RFC3325] The syntax for an unsafe attribute looks like this: ```rust -# #![feature(unsafe_attributes)] // SAFETY: there is no other global function of this name #[unsafe(no_mangle)] pub fn example() {} @@ -52,7 +51,6 @@ In the 2024 Edition, it is now required to mark these attributes as unsafe to em ```rust -# #![feature(unsafe_attributes)] // SAFETY: There should only be a single definition of the loop symbol. #[unsafe(export_name="loop")] fn arduino_loop() {