ABI of a ZST in function argument position?

⚓ rust    📅 2025-06-12    👤 surdeus    👁️ 2      

surdeus

Is it guaranteed that a ZST argument has no effect on a function's ABI? For example, are the following two functions guaranteed to have the same ABI?

extern "C" {
    fn foo(a: u8, b: u16);
    fn bar(a: u8, x: (), b: u16);
}

2 posts - 2 participants

Read full topic

🏷️ rust_feed