about summary refs log tree commit diff
path: root/src/tools/miri/tests/fail/function_pointers/abi_mismatch_simple.rs
blob: ca43c06008fd7e4744765d78b9eac0ad97e553ea (plain)
1
2
3
4
5
6
7
fn main() {
    fn f(_: (i32, i32)) {}

    let g = unsafe { std::mem::transmute::<fn((i32, i32)), fn(i32)>(f) };

    g(42) //~ ERROR: type (i32, i32) passing argument of type i32
}