Skip to content

Commit 7b88ecb

Browse files
committed
Update link_name for updated restrictions
rust-lang/rust#155817 added some restrictions on the symbol name in the `link_name` attribute. The name cannot be empty or contain null bytes.
1 parent ac7b991 commit 7b88ecb

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/items/external-blocks.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,9 @@ The *`link_name` [attribute][attributes]* may be applied to declarations inside
405405
r[items.extern.attributes.link_name.syntax]
406406
The `link_name` attribute uses the [MetaNameValueStr] syntax.
407407
408+
r[items.extern.attributes.link_name.invalid-names]
409+
The symbol name must not be the empty string, and must not contain any `U+0000` (NUL) bytes.
410+
408411
r[items.extern.attributes.link_name.allowed-positions]
409412
The `link_name` attribute may only be applied to a function or static item in an `extern` block.
410413

0 commit comments

Comments
 (0)