Skip to content

Commit de4f21b

Browse files
committed
Add abi.no_mangle.export_name
This specifies the conflict between no_mangle and export_name.
1 parent d2d1d66 commit de4f21b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/abi.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@ Only the first instance of `no_mangle` on an item is honored. Subsequent `no_man
100100
> [!NOTE]
101101
> `rustc` currently warns on subsequent duplicate `no_mangle` attributes.
102102
103+
r[abi.no_mangle.export_name]
104+
If `no_mangle` is used with [`export_name`][abi.export_name], then the `export_name` is used instead.
105+
103106
r[abi.no_mangle.unsafe]
104107
The `no_mangle` attribute must be marked with [`unsafe`][attributes.safety] because an unmangled symbol may collide with another symbol with the same name (or with a well-known symbol), leading to undefined behavior.
105108

0 commit comments

Comments
 (0)