You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The *`link_name` attribute* may be specified on declarations inside an `extern`
399
-
block to indicate the symbol to import for the given function or static.
398
+
The *`link_name`[attribute][attributes]* may be applied to declarations inside an `extern` block to specify the symbol to import for the given function or static.
399
+
400
+
> [!EXAMPLE]
401
+
> ```rust
402
+
> unsafeextern"C" {
403
+
> #[link_name ="actual_symbol_name"]
404
+
> safefnname_in_rust();
405
+
> }
406
+
> ```
400
407
401
408
r[items.extern.attributes.link_name.syntax]
402
-
It uses the [MetaNameValueStr] syntax to specify the name of the symbol.
409
+
The `link_name` attributeusesthe [MetaNameValueStr] syntax.
0 commit comments