You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/abi.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,6 +86,7 @@ r[abi.no_mangle.edition2024]
86
86
> [!EDITION-2024]
87
87
> Before the 2024 edition it is allowed to use the `no_mangle` attribute without the `unsafe` qualification.
88
88
89
+
<!-- template:attributes -->
89
90
r[abi.link_section]
90
91
## The `link_section` attribute
91
92
@@ -113,13 +114,13 @@ The `link_section` attribute may only be applied to:
113
114
- [Trait definition functions][items.traits] with a body
114
115
115
116
> [!NOTE]
116
-
> `rustc` currently warns in other positions, but this may be rejected in the future.
117
+
> `rustc` ignores use in other positions but lints against it. This may become an error in the future.
117
118
118
119
r[abi.link_section.duplicates]
119
-
Only the last instance of `link_section` on an item is honored. Previous `link_section` attributes are ignored.
120
+
Only the last use of `link_section` on an item has effect.
120
121
121
122
> [!NOTE]
122
-
> `rustc` currently warns on preceding duplicate `link_section` attributes. This may become an error in the future.
123
+
> `rustc` lints against any use preceding the last. This may become an error in the future.
123
124
124
125
r[abi.link_section.unsafe]
125
126
The `link_section` attribute must be marked with [`unsafe`][attributes.safety] because it allows users to place data and code into sections of memory not expecting them, such as mutable data into read-only areas.
0 commit comments