2015-01-08 04:54:35 -06:00
|
|
|
fn foo(_x: isize) { }
|
2013-10-09 17:36:26 -05:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let v: u64 = 5;
|
2015-01-08 04:54:35 -06:00
|
|
|
let x = foo as extern "C" fn() -> isize;
|
2017-06-09 15:04:29 -05:00
|
|
|
//~^ ERROR non-primitive cast
|
2015-01-08 04:54:35 -06:00
|
|
|
let y = v as extern "Rust" fn(isize) -> (isize, isize);
|
2017-06-09 15:04:29 -05:00
|
|
|
//~^ ERROR non-primitive cast
|
2013-10-09 17:36:26 -05:00
|
|
|
y(x());
|
|
|
|
}
|