From eaba97f2e01fcfc057f4b341ba544661c6d3cac1 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Tue, 24 Mar 2026 10:09:16 -0700 Subject: [PATCH] Update link_name duplicates note The behavior of the `link_name` attribute when there are duplicates has changed via https://github.com/rust-lang/rust/pull/153041. --- src/items/external-blocks.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/items/external-blocks.md b/src/items/external-blocks.md index 6fdb70028f..912a55e3e2 100644 --- a/src/items/external-blocks.md +++ b/src/items/external-blocks.md @@ -412,10 +412,10 @@ The `link_name` attribute may only be applied to a function or static item in an > `rustc` ignores use in other positions but lints against it. This may become an error in the future. r[items.extern.attributes.link_name.duplicates] -Only the last use of `link_name` on an item has effect. +Only the first use of `link_name` on an item has effect. > [!NOTE] -> `rustc` lints against any use preceding the last. This may become an error in the future. +> `rustc` lints against any use following the first with a future-compatibility warning. This may become an error in the future. r[items.extern.attributes.link_name.link_ordinal] The `link_name` attribute may not be used with the [`link_ordinal`] attribute.