File tree Expand file tree Collapse file tree 1 file changed +15
-8
lines changed Expand file tree Collapse file tree 1 file changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -107,21 +107,28 @@ component after the function name. This might be necessary if there is not
107107sufficient context to determine the type parameters. For example,
108108` mem::size_of::<u32>() == 4 ` .
109109
110- ## Extern functions
110+ ## Extern function qualifier
111111
112- Extern function _ definitions _ allow defining functions that can be called
113- with a particular ABI:
112+ The ` extern ` function qualifier allows providing function _ definitions _ that can
113+ be called with a particular ABI:
114114
115115``` rust,ignore
116116extern "ABI" fn foo() { ... }
117117```
118118
119- An extern function _ declaration _ via an [ external block] can be used to
120- provide an item for these functions that can be called by Rust code without
121- providing their definition.
119+ These are often used in combination with [ external block] items which provide
120+ function _ declarations _ that can be used to call functions without providing
121+ their _ definition _ :
122122
123- When ` "extern" Abi?* ` is omitted from ` FunctionQualifiers ` , the ABI ` "Rust" ` is
124- assigned. For example:
123+ ``` rust,ignore
124+ extern "ABI" {
125+ fn foo(); /* no body */
126+ }
127+ unsafe { foo() }
128+ ```
129+
130+ When ` "extern" Abi?* ` is omitted from ` FunctionQualifiers ` in function items,
131+ the ABI ` "Rust" ` is assigned. For example:
125132
126133``` rust
127134fn foo () {}
You can’t perform that action at this time.
0 commit comments