mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
11 lines
242 B
Rust
11 lines
242 B
Rust
fn foo(_x: isize) { }
|
|
|
|
fn main() {
|
|
let v: u64 = 5;
|
|
let x = foo as extern "C" fn() -> isize;
|
|
//~^ ERROR non-primitive cast
|
|
let y = v as extern "Rust" fn(isize) -> (isize, isize);
|
|
//~^ ERROR non-primitive cast
|
|
y(x());
|
|
}
|