Pre-RFC: Explicit overload sets for mixed-arity function calls
Rust Internals [Unofficial]
June 9, 2026
chrefr:
What I didn't emphasized enough though was that the experiment is for the purposes of FFI only, although that won't be enough to stop users.
And exactly that is why I think the FFI focused experiments with overloading are misguided. Making FFI slightly easier isn't worth the cost to devex for the rest of the language.
I have yet to see a convincing argument as to why you can't just rename the function at the language boarder. The mangled name in C++ differs anyway, so why not just expose it as foo_i32(a: i32) and foo_f32(a: f32) or such? That targets FFI, is doable with current language features and attributes, and doesn't pollute the rest of the language.
Discussion in the ATmosphere