@@ -431,11 +431,29 @@ The *`link_ordinal` [attribute][attributes]* can be applied on declarations insi
431
431
> }
432
432
> ```
433
433
434
+ r [items . extern . attributes. link_ordinal. syntax]
435
+ The syntax for the `link_ordinal ` attribute is :
436
+
437
+ ```grammar ,attributes
438
+ LinkOrdinalAttribute -> `link_ordinal ` `(` LinkOrdinal `)`
439
+
440
+ LinkOrdinal -> DEC_LITERAL | BIN_LITERAL | OCT_LITERAL | HEX_LITERAL
441
+ ```
442
+
443
+ r[ items.extern.attributes.link_ordinal.max]
444
+ The ordinal must be less than or equal to [ ` u16::MAX ` ] .
445
+
446
+ r[ items.extern.attributes.link_ordinal.allowed-positions]
447
+ The ` link_ordinal ` attribute may be specified on a function or static in an ` extern ` block.
448
+
449
+ r[ items.extern.attributes.link_ordinal.duplicates]
450
+ The ` link_ordinal ` attribute may only be specified once on an item.
451
+
434
452
r[ items.extern.attributes.link_ordinal.allowed-kinds]
435
- This attribute is only used with the `raw - dylib ` linking kind . Using any other kind will result in a compiler error .
453
+ The ` link_ordinal ` attribute may only be used with the [ ` raw-dylib ` linking kind] [ items.extern.attributes.link.raw-dylib ] .
436
454
437
- r [items . extern . attributes. link_ordinal. exclusive ]
438
- Using this attribute with the `link_name ` attribute will result in a compiler error .
455
+ r[ items.extern.attributes.link_ordinal.link_name ]
456
+ The ` link_ordinal ` attribute may not be used with the [ ` link_name ` ] attribute.
439
457
440
458
r[ items.extern.attributes.fn-parameters]
441
459
### Attributes on function parameters
@@ -456,3 +474,4 @@ restrictions as [regular function parameters].
456
474
[ statics ] : static-items.md
457
475
[ unwind-behavior ] : functions.md#unwinding
458
476
[ value namespace ] : ../names/namespaces.md
477
+ [ `link_name` ] : items.extern.attributes.link_name
0 commit comments