2022-02-06 16:43:51 +08:00
|
|
|
$ cargo run
|
|
|
|
Compiling unsafe-example v0.1.0 (file:///projects/unsafe-example)
|
2024-06-06 21:23:21 +08:00
|
|
|
error[E0133]: call to unsafe function `dangerous` is unsafe and requires unsafe function or block
|
2022-02-06 16:43:51 +08:00
|
|
|
--> src/main.rs:4:5
|
|
|
|
|
|
|
|
|
4 | dangerous();
|
|
|
|
| ^^^^^^^^^^^ call to unsafe function
|
|
|
|
|
|
|
|
|
= note: consult the function's documentation for information on how to avoid undefined behavior
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0133`.
|
2024-06-06 21:23:21 +08:00
|
|
|
error: could not compile `unsafe-example` (bin "unsafe-example") due to 1 previous error
|