2016-08-27 01:44:46 -06:00
|
|
|
fn main() {
|
2020-03-21 12:52:23 +01:00
|
|
|
fn f() {}
|
2016-06-14 10:34:54 +02:00
|
|
|
|
2022-06-19 20:33:59 -07:00
|
|
|
let g = unsafe { std::mem::transmute::<fn(), fn(i32)>(f) };
|
2016-06-14 10:34:54 +02:00
|
|
|
|
2022-07-11 11:44:55 +00:00
|
|
|
g(42) //~ ERROR: calling a function with more arguments than it expected
|
2016-06-14 10:34:54 +02:00
|
|
|
}
|