Sounds like what Rust needs is compile macros [1]. That way, printf can still be a function, but it would be optimized at compile time if the formatting string is constant.
[1] https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node101.html
[1] https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node101.html