mirror of
https://github.com/rust-lang-cn/book-cn.git
synced 2025-02-02 23:38:41 +08:00
17 lines
563 B
Plaintext
17 lines
563 B
Plaintext
|
$ cargo run
|
||
|
Compiling unsafe-example v0.1.0 (file:///projects/unsafe-example)
|
||
|
error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
|
||
|
--> 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
|
||
|
|
||
|
error: aborting due to previous error
|
||
|
|
||
|
For more information about this error, try `rustc --explain E0133`.
|
||
|
error: could not compile `unsafe-example`
|
||
|
|
||
|
To learn more, run the command again with --verbose.
|