2023-12-07 11:56:48 +00:00
|
|
|
error[E0133]: call to unsafe function `foo` is unsafe and requires unsafe function or block
|
|
|
|
--> $DIR/const-extern-fn-requires-unsafe.rs:10:5
|
2020-05-07 13:12:47 +08:00
|
|
|
|
|
2023-10-26 16:13:20 +00:00
|
|
|
LL | foo();
|
|
|
|
| ^^^^^ call to unsafe function
|
2020-05-07 13:12:47 +08:00
|
|
|
|
|
|
|
|
= note: consult the function's documentation for information on how to avoid undefined behavior
|
|
|
|
|
2023-12-07 11:56:48 +00:00
|
|
|
error[E0133]: call to unsafe function `foo` is unsafe and requires unsafe function or block
|
|
|
|
--> $DIR/const-extern-fn-requires-unsafe.rs:8:17
|
2020-05-07 13:12:47 +08:00
|
|
|
|
|
2023-10-26 16:13:20 +00:00
|
|
|
LL | let a: [u8; foo()];
|
|
|
|
| ^^^^^ call to unsafe function
|
2020-05-07 13:12:47 +08:00
|
|
|
|
|
|
|
|
= note: consult the function's documentation for information on how to avoid undefined behavior
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0133`.
|