From e1ae08fa1eb9c45ed5d008b443996445ff73e364 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Mon, 19 Aug 2024 08:48:04 -0700 Subject: [PATCH 1/2] 2024: Add unsafe attribute differences --- src/abi.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/abi.md b/src/abi.md index 09ff20b16..0a6dee7a2 100644 --- a/src/abi.md +++ b/src/abi.md @@ -74,6 +74,8 @@ with the same name (or with a well-known symbol), leading to undefined behavior. extern "C" fn foo() {} ``` +> **Edition Differences**: Before the 2024 edition it is allowed to use the `no_mangle` attribute without the `unsafe` qualification. + ## The `link_section` attribute The *`link_section` attribute* specifies the section of the object file that a @@ -90,6 +92,8 @@ of memory not expecting them, such as mutable data into read-only areas. pub static VAR1: u32 = 1; ``` +> **Edition Differences**: Before the 2024 edition it is allowed to use the `link_section` attribute without the `unsafe` qualification. + ## The `export_name` attribute The *`export_name` attribute* specifies the name of the symbol that will be @@ -105,6 +109,8 @@ behavior. pub fn name_in_rust() { } ``` +> **Edition Differences**: Before the 2024 edition it is allowed to use the `export_name` attribute without the `unsafe` qualification. + [_MetaNameValueStr_]: attributes.md#meta-item-attribute-syntax [`static` items]: items/static-items.md [attribute]: attributes.md From bd544ee16ebf844bed12afd66812d163aa70a35a Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Tue, 20 Aug 2024 16:10:23 -0700 Subject: [PATCH 2/2] Use lowercase "differences" --- src/abi.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/abi.md b/src/abi.md index 0a6dee7a2..b28457ad9 100644 --- a/src/abi.md +++ b/src/abi.md @@ -74,7 +74,7 @@ with the same name (or with a well-known symbol), leading to undefined behavior. extern "C" fn foo() {} ``` -> **Edition Differences**: Before the 2024 edition it is allowed to use the `no_mangle` attribute without the `unsafe` qualification. +> **Edition differences**: Before the 2024 edition it is allowed to use the `no_mangle` attribute without the `unsafe` qualification. ## The `link_section` attribute @@ -92,7 +92,7 @@ of memory not expecting them, such as mutable data into read-only areas. pub static VAR1: u32 = 1; ``` -> **Edition Differences**: Before the 2024 edition it is allowed to use the `link_section` attribute without the `unsafe` qualification. +> **Edition differences**: Before the 2024 edition it is allowed to use the `link_section` attribute without the `unsafe` qualification. ## The `export_name` attribute @@ -109,7 +109,7 @@ behavior. pub fn name_in_rust() { } ``` -> **Edition Differences**: Before the 2024 edition it is allowed to use the `export_name` attribute without the `unsafe` qualification. +> **Edition differences**: Before the 2024 edition it is allowed to use the `export_name` attribute without the `unsafe` qualification. [_MetaNameValueStr_]: attributes.md#meta-item-attribute-syntax [`static` items]: items/static-items.md