We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2c0ea0b commit 8f55815Copy full SHA for 8f55815
src/abi.md
@@ -58,6 +58,18 @@ The *`used` [attribute]* forces a [`static` item][items.static] to be kept in th
58
> 0000000000000000 T foo::quux
59
> ```
60
61
+r[abi.used.syntax]
62
+The `used` attribute uses the [MetaWord] syntax and thus does not take any inputs.
63
+
64
+r[abi.used.allowed-positions]
65
+The `used` attribute may only be applied to [`static` items][items.static].
66
67
+r[abi.used.duplicates]
68
+Only the first instance of `used` on an item is honored. Subsequent `used` attributes are ignored.
69
70
+> [!NOTE]
71
+> `rustc` currently warns on subsequent duplicate `used` attributes.
72
73
r[abi.no_mangle]
74
## The `no_mangle` attribute
75
0 commit comments