diff options
Diffstat (limited to 'tests/ui/cast/cast-to-bare-fn.stderr')
-rw-r--r-- | tests/ui/cast/cast-to-bare-fn.stderr | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/cast/cast-to-bare-fn.stderr b/tests/ui/cast/cast-to-bare-fn.stderr new file mode 100644 index 000000000..d97b0c5f8 --- /dev/null +++ b/tests/ui/cast/cast-to-bare-fn.stderr @@ -0,0 +1,15 @@ +error[E0605]: non-primitive cast: `fn(isize) {foo}` as `extern "C" fn() -> isize` + --> $DIR/cast-to-bare-fn.rs:5:13 + | +LL | let x = foo as extern "C" fn() -> isize; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invalid cast + +error[E0605]: non-primitive cast: `u64` as `fn(isize) -> (isize, isize)` + --> $DIR/cast-to-bare-fn.rs:7:13 + | +LL | let y = v as extern "Rust" fn(isize) -> (isize, isize); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invalid cast + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0605`. |