rust/tests/ui/consts/const-extern-fn/const-extern-fn-requires-unsafe.stderr
2024-09-14 18:07:06 +02:00

36 lines
1.4 KiB
Plaintext

error[E0133]: call to unsafe function `foo` is unsafe and requires unsafe function or block
--> $DIR/const-extern-fn-requires-unsafe.rs:12:5
|
LL | foo();
| ^^^^^ call to unsafe function
|
= note: consult the function's documentation for information on how to avoid undefined behavior
error[E0133]: call to unsafe function `bar` is unsafe and requires unsafe function or block
--> $DIR/const-extern-fn-requires-unsafe.rs:16:5
|
LL | bar();
| ^^^^^ call to unsafe function
|
= note: consult the function's documentation for information on how to avoid undefined behavior
error[E0133]: call to unsafe function `foo` is unsafe and requires unsafe function or block
--> $DIR/const-extern-fn-requires-unsafe.rs:10:17
|
LL | let a: [u8; foo()];
| ^^^^^ call to unsafe function
|
= note: consult the function's documentation for information on how to avoid undefined behavior
error[E0133]: call to unsafe function `bar` is unsafe and requires unsafe function or block
--> $DIR/const-extern-fn-requires-unsafe.rs:14:17
|
LL | let b: [u8; bar()];
| ^^^^^ call to unsafe function
|
= note: consult the function's documentation for information on how to avoid undefined behavior
error: aborting due to 4 previous errors
For more information about this error, try `rustc --explain E0133`.