@@ -112,23 +112,22 @@ sufficient context to determine the type parameters. For example,
112112Extern function _ definitions_ allow defining functions that can be called
113113with a particular ABI:
114114
115- ``` rust,norun
115+ ``` rust,no_run
116116extern "ABI" fn foo() { ... }
117117```
118118
119119An extern function _ declaration_ via an [ external block] can be used to
120120provide an item for these functions that can be called by Rust code without
121121providing their definition.
122122
123- The default ABI of Rust functions like ` fn foo() {} ` is ` "Rust" ` . While we
124- abbreviate the type of Rust functions like ` foo ` as ` fn() ` , this is actually a
125- synonym for ` extern "Rust" fn() ` . That is, this:
123+ When ` "extern" Abi?* ` is omitted from ` FunctionQualifiers ` , the ABI ` "Rust" ` is
124+ assigned. For example:
126125
127126``` rust
128127fn foo () {}
129128```
130129
131- is identical to
130+ is equivalent to:
132131
133132``` rust
134133extern " Rust" fn foo () {}
@@ -148,30 +147,34 @@ extern "stdcall" fn new_i32_stdcall() -> i32 { 0 }
148147```
149148
150149Just as with [ external block] , when the ` extern ` keyword is used and the ` "ABI `
151- is omitted, the ABI used defaults to ` "C" ` . That is, this
150+ is omitted, the ABI used defaults to ` "C" ` . That is, this:
152151
153152``` rust
154153extern fn new_i32 () -> i32 { 0 }
155154let fptr : extern fn () -> i32 = new_i32 ;
156155```
157156
158- is identical to
157+ is equivalent to:
159158
160159``` rust
161160extern " C" fn new_i32 () -> i32 { 0 }
162161let fptr : extern " C" fn () -> i32 = new_i32 ;
163162```
164163
165- Since functions with an ABI that differs from ` "Rust" ` do not support
166- unwinding in the exact same way that Rust does, unwinding past the end
167- of functions with such ABIs causes the process to abort. In LLVM, this is
168- implemented by executing an illegal instruction.
164+ Functions with an ABI that differs from ` "Rust" ` do not support unwinding in the
165+ exact same way that Rust does. Therefore, unwinding past the end of functions
166+ with such ABIs causes the process to abort.
169167
170- Some ABIs that are identical to ` "Rust" ` are:
168+ ** Non-normative note** : The LLVM backend of the current Rust implementation
169+ aborts the process by executing an illegal instruction.
171170
172- * ` "rust-call" `
173- * ` "platform-intrinsic" `
174- * ` "rust-intrinsic" `
171+ ** Non-normative note** : There are other ABIs available in unstable Rust that are
172+ equivalent to the ` "Rust" ` ABI, e.g.,
173+ [ ` "rust-intrinsic" ` ] ( https://doc.rust-lang.org/unstable-book/language-features/intrinsics.html?highlight=rust-intrin#intrinsics )
174+ or
175+ [ ` "platform-intrinsic" ` ] ( https://doc.rust-lang.org/unstable-book/language-features/platform-intrinsics.html ) .
176+ Refer to the [ Unstable Book] ( https://doc.rust-lang.org/unstable-book ) for more
177+ information about these.
175178
176179## Const functions
177180
0 commit comments