Currying is a functional programming technique that allows you to partially apply a function’s arguments and return a new function that takes the remaining arguments. This is widely used in functional programming languages like Haskell, as a fundamental tool for many design patterns. However, today we use the technique in Rust to improve the performance of our functions.
TL;DR: You can also take a look to the proc macro const-currying directly.
If the function is module local (idk the rust jargon for that) or the compiler supports whole program optimization, this should happen automatically.