1
0
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:
Nabeelimran 2025-04-26 20:37:10 +05:00 committed by GitHub
parent 059e75b47c
commit d6fbd215a1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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