Files
rust/tests/fail/function_pointers/cast_fn_ptr1.rs
T
2022-06-20 02:23:53 -07:00

8 lines
170 B
Rust

fn main() {
fn f() {}
let g = unsafe { std::mem::transmute::<fn(), fn(i32)>(f) };
g(42) //~ ERROR calling a function with more arguments than it expected
}