From 7b88ecb3dfb3b547fe1980124e7e711bd32a6bcc Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Mon, 11 May 2026 14:20:01 -0700 Subject: [PATCH] Update link_name for updated restrictions https://github.com/rust-lang/rust/pull/155817 added some restrictions on the symbol name in the `link_name` attribute. The name cannot be empty or contain null bytes. --- src/items/external-blocks.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/items/external-blocks.md b/src/items/external-blocks.md index e1704556b5..fd0ec4e57a 100644 --- a/src/items/external-blocks.md +++ b/src/items/external-blocks.md @@ -405,6 +405,9 @@ The *`link_name` [attribute][attributes]* may be applied to declarations inside r[items.extern.attributes.link_name.syntax] The `link_name` attribute uses the [MetaNameValueStr] syntax. +r[items.extern.attributes.link_name.invalid-names] +The symbol name must not be the empty string, and must not contain any `U+0000` (NUL) bytes. + r[items.extern.attributes.link_name.allowed-positions] The `link_name` attribute may only be applied to a function or static item in an `extern` block.