@@ -61,6 +61,7 @@ $ nm -C foo.o
61610000000000000000 T foo::quux
6262```
6363
64+ <!-- template:attributes -->
6465r[ abi.no_mangle]
6566## The ` no_mangle ` attribute
6667
@@ -74,7 +75,7 @@ The *`no_mangle` attribute* may be used on functions and statics to disable stan
7475> ```
7576
7677r [abi . no_mangle. syntax]
77- The `no_mangle ` attribute uses the [MetaWord ] syntax and thus does not take any inputs .
78+ The `no_mangle ` attribute uses the [MetaWord ] syntax .
7879
7980r [abi . no_mangle. allowed- positions ]
8081The `no_mangle ` attribute may only be applied to :
@@ -87,7 +88,7 @@ The `no_mangle` attribute may only be applied to:
8788It may not be used with a [closure ].
8889
8990> [! NOTE ]
90- > `rustc ` currently warns in other positions , but this may be rejected in the future .
91+ > `rustc ` ignores use in other positions but lints against it . This may become an error in the future.
9192
9293<! -- TODO : Currently it works on a trait function with a body, but generates a warning about being phased out. how do we document that?
9394https: // github.com/rust-lang/rust/pull/86492#issuecomment-885682960
@@ -96,10 +97,10 @@ https://github.com/rust-lang/rust/pull/86492#issuecomment-885682960
9697<! -- TODO : should this clarify that external block items are already unmangled? , and thus the attribute does nothing? Currently it is "phased out" warning. - ->
9798
9899r[abi. no_mangle. duplicates]
99- Only the first instance of `no_mangle ` on an item is honored . Subsequent ` no_mangle ` attributes are ignored .
100+ The `no_mangle` attribute may be used any number of times on a form .
100101
101102> [! NOTE ]
102- > `rustc ` currently warns on subsequent duplicate ` no_mangle ` attributes .
103+ > `rustc` lints against any use following the first .
103104
104105r[abi. no_mangle. export_name]
105106If `no_mangle` is used with [`export_name`][abi. export_name], then the `export_name` is used instead.
0 commit comments