File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -406,10 +406,22 @@ The *`link_name` [attribute][attributes]* may be specified on declarations insid
406406> ```
407407
408408r [items . extern . attributes. link_name. syntax]
409- It uses the [MetaNameValueStr ] syntax to specify the name of the symbol .
409+ The ` link_name ` attribute uses the [MetaNameValueStr ] syntax to specify the name of the symbol .
410410
411- r [items . extern . attributes. link_name. exclusive]
412- Using this attribute with the `link_ordinal ` attribute will result in a compiler error .
411+ r [items . extern . attributes. link_name. allowed- positions ]
412+ The `link_name ` attribute may be specified on a function or static in an `extern ` block .
413+
414+ > [! NOTE ]
415+ > `rustc ` currently warns in other positions , but this may be rejected in the future .
416+
417+ r [items . extern . attributes. link_name. duplicates]
418+ Only the last instance of `link_name ` on an item is used to determine the symbol name .
419+
420+ > [! NOTE ]
421+ > `rustc ` currently warns on preceding duplicate `link_name ` attributes . This may become an error in the future .
422+
423+ r [items . extern . attributes. link_name. link_ordinal]
424+ The `link_name ` attribute may not be used with the [`link_ordinal `] attribute .
413425
414426r [items . extern . attributes. link_ordinal]
415427### The `link_ordinal ` attribute
@@ -460,3 +472,4 @@ restrictions as [regular function parameters].
460472[ statics ] : static-items.md
461473[ unwind-behavior ] : functions.md#unwinding
462474[ value namespace ] : ../names/namespaces.md
475+ [ `link_ordinal` ] : items.extern.attributes.link_ordinal
You can’t perform that action at this time.
0 commit comments