Skip to content

Commit

Permalink
Merge pull request #1579 from ehuss/unsafe-attr-2024
Browse files Browse the repository at this point in the history
2024: Add unsafe attribute differences
  • Loading branch information
ehuss authored Nov 25, 2024
2 parents 440c0bd + bd544ee commit 0b9ba54
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/abi.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 0b9ba54

Please sign in to comment.