2017-05-26 22:02:51 -05:00
|
|
|
fn main() {
|
|
|
|
fn f(_ : (i32,i32)) {}
|
|
|
|
|
|
|
|
let g = unsafe {
|
|
|
|
std::mem::transmute::<fn((i32,i32)), fn(i32)>(f)
|
|
|
|
};
|
|
|
|
|
2018-05-09 10:45:16 -05:00
|
|
|
g(42) //~ ERROR constant evaluation error [E0080]
|
|
|
|
//~^ NOTE tried to call a function with sig fn((i32, i32)) through a function pointer of type fn(i32)
|
2017-05-26 22:02:51 -05:00
|
|
|
}
|