2016-06-17 16:49:06 +02:00
|
|
|
// just making sure that fn -> unsafe fn casts are handled by rustc so miri doesn't have to
|
|
|
|
fn main() {
|
|
|
|
fn f() {}
|
|
|
|
|
2017-06-27 21:31:38 -04:00
|
|
|
let g = f as fn() as fn(i32) as unsafe fn(i32); //~ERROR: non-primitive cast: `fn()` as `fn(i32)`
|
2016-06-17 16:49:06 +02:00
|
|
|
|
|
|
|
unsafe {
|
|
|
|
g(42);
|
|
|
|
}
|
|
|
|
}
|