Skip to content

Commit f584bf2

Browse files
authored
Merge pull request #2213 from JonathanBrouwer/attrs
Update reference for attribute order changes
2 parents 3559469 + 0227368 commit f584bf2

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/abi.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,12 @@ r[abi.link_section.unsafe]
107107
This attribute is unsafe as it allows users to place data and code into sections
108108
of memory not expecting them, such as mutable data into read-only areas.
109109

110+
r[abi.link_section.duplicates]
111+
Only the first use of `link_section` on an item has effect.
112+
113+
> [!NOTE]
114+
> `rustc` lints against any use following the first with a future-compatibility warning. This may become an error in the future.
115+
110116
r[abi.link_section.edition2024]
111117
> [!EDITION-2024]
112118
> Before the 2024 edition it is allowed to use the `link_section` attribute without the `unsafe` qualification.
@@ -131,6 +137,12 @@ This attribute is unsafe as a symbol with a custom name may collide with another
131137
symbol with the same name (or with a well-known symbol), leading to undefined
132138
behavior.
133139

140+
r[abi.export_name.duplicates]
141+
Only the first use of `export_name` on an item has effect.
142+
143+
> [!NOTE]
144+
> `rustc` lints against any use following the first with a future-compatibility warning. This may become an error in the future.
145+
134146
r[abi.export_name.edition2024]
135147
> [!EDITION-2024]
136148
> Before the 2024 edition it is allowed to use the `export_name` attribute without the `unsafe` qualification.

0 commit comments

Comments
 (0)