2020-01-19 11:53:25 -06:00
|
|
|
warning: skipping const checks
|
2020-04-29 02:53:22 -05:00
|
|
|
--> $DIR/abi-mismatch.rs:9:1
|
2020-01-19 11:53:25 -06:00
|
|
|
|
|
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 | | }
|
|
|
|
| |_^
|
2020-01-19 11:53:25 -06:00
|
|
|
|
|
|
|
warning: skipping const checks
|
2020-04-29 02:53:22 -05:00
|
|
|
--> $DIR/abi-mismatch.rs:17:1
|
2020-01-19 11:53:25 -06:00
|
|
|
|
|
2020-04-19 05:32:21 -05:00
|
|
|
LL | static VAL: () = call_rust_fn(unsafe { std::mem::transmute(c_fn as extern "C" fn()) });
|
2020-04-29 02:53:22 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2020-01-19 11:53:25 -06:00
|
|
|
|
2020-04-19 05:32:21 -05:00
|
|
|
error[E0080]: could not evaluate static initializer
|
2020-04-29 02:53:22 -05:00
|
|
|
--> $DIR/abi-mismatch.rs:11:5
|
2020-01-19 11:53:25 -06:00
|
|
|
|
|
|
|
|
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
|
2020-01-19 11:53:25 -06:00
|
|
|
...
|
2020-04-19 05:32:21 -05:00
|
|
|
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
|
2020-01-19 11:53:25 -06:00
|
|
|
|
2020-03-11 10:30:09 -05:00
|
|
|
error: aborting due to previous error; 2 warnings emitted
|
2020-01-19 11:53:25 -06:00
|
|
|
|
2020-04-19 05:32:21 -05:00
|
|
|
For more information about this error, try `rustc --explain E0080`.
|