Skip to content

Commit 0b9ba54

Browse files
authored
Merge pull request #1579 from ehuss/unsafe-attr-2024
2024: Add unsafe attribute differences
2 parents 440c0bd + bd544ee commit 0b9ba54

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/abi.md

+6
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ with the same name (or with a well-known symbol), leading to undefined behavior.
7474
extern "C" fn foo() {}
7575
```
7676

77+
> **Edition differences**: Before the 2024 edition it is allowed to use the `no_mangle` attribute without the `unsafe` qualification.
78+
7779
## The `link_section` attribute
7880

7981
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.
9092
pub static VAR1: u32 = 1;
9193
```
9294

95+
> **Edition differences**: Before the 2024 edition it is allowed to use the `link_section` attribute without the `unsafe` qualification.
96+
9397
## The `export_name` attribute
9498

9599
The *`export_name` attribute* specifies the name of the symbol that will be
@@ -105,6 +109,8 @@ behavior.
105109
pub fn name_in_rust() { }
106110
```
107111

112+
> **Edition differences**: Before the 2024 edition it is allowed to use the `export_name` attribute without the `unsafe` qualification.
113+
108114
[_MetaNameValueStr_]: attributes.md#meta-item-attribute-syntax
109115
[`static` items]: items/static-items.md
110116
[attribute]: attributes.md

0 commit comments

Comments
 (0)