@@ -333,7 +333,8 @@ Within the `unsafe extern "C"` block, we list the names and signatures of
333
333
external functions from another language we want to call. The ` "C" ` part defines
334
334
which _ application binary interface (ABI)_ the external function uses: the ABI
335
335
defines how to call the function at the assembly level. The ` "C" ` ABI is the
336
- most common and follows the C programming language’s ABI.
336
+ most common and follows the C programming language’s ABI. Information about all
337
+ the ABIs Rust supports is available in [ the Rust Reference] [ ABI ] .
337
338
338
339
This particular function does not have any memory safety considerations, though.
339
340
In fact, we know that any call to ` abs ` will always be safe for any ` i32 ` , so we
@@ -481,7 +482,7 @@ _union_. A `union` is similar to a `struct`, but only one declared field is
481
482
used in a particular instance at one time . Unions are primarily used to
482
483
interface with unions in C code . Accessing union fields is unsafe because Rust
483
484
can ’t guarantee the type of the data currently being stored in the union
484
- instance . You can learn more about unions in [the Rust Reference ][reference ].
485
+ instance . You can learn more about unions in [the Rust Reference ][unions ].
485
486
486
487
### Using Miri to check unsafe code
487
488
@@ -535,9 +536,10 @@ Whenever you write unsafe code, you can use Miri to help you be more confident
535
536
that the code you have written upholds Rust ’s rules.
536
537
537
538
[dangling- references]: ch04- 02- references- and- borrowing. html#dangling- references
539
+ [ABI ]: .. / reference/ items/ external- blocks. html#abi
538
540
[differences- between- variables- and- constants]: ch03- 01- variables- and- mutability. html#constants
539
541
[extensible- concurrency- with- the- sync- and- send- traits]: ch16- 04- extensible- concurrency- sync- and- send. html#extensible- concurrency- with- the- sync- and- send- traits
540
542
[the- slice- type ]: ch04- 03- slices. html#the- slice- type
541
- [reference ]: .. / reference/ items/ unions. html
543
+ [unions ]: .. / reference/ items/ unions. html
542
544
[miri]: https: // github.com/rust-lang/miri
543
545
[nightly]: appendix- 07- nightly- rust. html
0 commit comments