mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-05-16 07:36:05 +02:00
fix: typo in "unsafe external functions" (#2724)
This commit is contained in:
parent
059e75b47c
commit
d6fbd215a1
@ -33,9 +33,9 @@ fn main() {
|
||||
1.82 with `unsafe extern` blocks.
|
||||
- `abs` must be explicitly marked as `safe` because it is an external function
|
||||
(FFI). Calling external functions is usually only a problem when those
|
||||
functions do things with pointers which which might violate Rust's memory
|
||||
model, but in general any C function might have undefined behaviour under any
|
||||
arbitrary circumstances.
|
||||
functions do things with pointers which might violate Rust's memory model, but
|
||||
in general any C function might have undefined behaviour under any arbitrary
|
||||
circumstances.
|
||||
- The `"C"` in this example is the ABI;
|
||||
[other ABIs are available too](https://doc.rust-lang.org/reference/items/external-blocks.html).
|
||||
- Note that there is no verification that the Rust function signature matches
|
||||
|
Loading…
x
Reference in New Issue
Block a user