Skip to content

Commit f629545

Browse files
committed
Minor update of link_section
More closely align with the template, and some minor word tweaks.
1 parent f564619 commit f629545

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/abi.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ r[abi.no_mangle.edition2024]
8686
> [!EDITION-2024]
8787
> Before the 2024 edition it is allowed to use the `no_mangle` attribute without the `unsafe` qualification.
8888
89+
<!-- template:attributes -->
8990
r[abi.link_section]
9091
## The `link_section` attribute
9192

@@ -113,13 +114,13 @@ The `link_section` attribute may only be applied to:
113114
- [Trait definition functions][items.traits] with a body
114115
115116
> [!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.
117118
118119
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.
120121
121122
> [!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.
123124
124125
r[abi.link_section.unsafe]
125126
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

Comments
 (0)