rust/tests/ui/cast/cast-to-bare-fn.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
601 B
Plaintext
Raw Normal View History

2018-08-08 14:28:26 +02:00
error[E0605]: non-primitive cast: `fn(isize) {foo}` as `extern "C" fn() -> isize`
2018-12-25 08:56:47 -07:00
--> $DIR/cast-to-bare-fn.rs:5:13
2018-08-08 14:28:26 +02:00
|
LL | let x = foo as extern "C" fn() -> isize;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invalid cast
2018-08-08 14:28:26 +02:00
error[E0605]: non-primitive cast: `u64` as `fn(isize) -> (isize, isize)`
2018-12-25 08:56:47 -07:00
--> $DIR/cast-to-bare-fn.rs:7:13
2018-08-08 14:28:26 +02:00
|
LL | let y = v as extern "Rust" fn(isize) -> (isize, isize);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invalid cast
2018-08-08 14:28:26 +02:00
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0605`.