rust/src/test/ui/consts/miri_unleashed/abi-mismatch.stderr

34 lines
1.0 KiB
Plaintext
Raw Normal View History

warning: skipping const checks
2020-04-29 02:53:22 -05:00
--> $DIR/abi-mismatch.rs:9:1
|
2020-04-29 02:53:22 -05:00
LL | / const fn call_rust_fn(my_fn: extern "Rust" fn()) {
LL | |
LL | | my_fn();
LL | |
LL | |
LL | |
LL | | }
| |_^
warning: skipping const checks
2020-04-29 02:53:22 -05:00
--> $DIR/abi-mismatch.rs:17:1
|
LL | static VAL: () = call_rust_fn(unsafe { std::mem::transmute(c_fn as extern "C" fn()) });
2020-04-29 02:53:22 -05:00
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0080]: could not evaluate static initializer
2020-04-29 02:53:22 -05:00
--> $DIR/abi-mismatch.rs:11:5
|
LL | my_fn();
| ^^^^^^^
| |
2020-03-08 13:44:09 -05:00
| calling a function with ABI C using caller ABI Rust
2020-04-29 02:53:22 -05:00
| inside `call_rust_fn` at $DIR/abi-mismatch.rs:11:5
...
LL | static VAL: () = call_rust_fn(unsafe { std::mem::transmute(c_fn as extern "C" fn()) });
| --------------------------------------------------------------------- inside `VAL` at $DIR/abi-mismatch.rs:17:18
error: aborting due to previous error; 2 warnings emitted
For more information about this error, try `rustc --explain E0080`.