Elektrine lite

← Feed

@Mara@hachyderm.io

Post #1364973

2025-11-13 21:13 UTC

@bascule Yeah, the problem was that it was incredibly hard to change anything about format_args!() and fmt::Arguments. The code in the compiler that expands the macro was messy and mixed implementation details of the fmt::Arguments structure into pretty much every part of the code, meaning that you had to rewrite a large chunk of the compiler just to try out a new fmt::Arguments implementation. Clippy used to depend on the exact expansion of format_args!() and would break with any change. During bootstrap, the standard library used to be compiled with both the old and new compiler, meaning it'd need to support both the old and new format_args!() expansion if you changed anything. And there were some stable API promises, such as support for the entire usize range for the width and precision fields, which blocked certain improvements. It's taken years to slowly remove these roadblocks one by one. We have now *finally* reached a point where it's actually doable to overhaul format_args!() and fmt::Arguments without losing your mind. See the tracking issue for some of the history: https://github.com/rust-lang/rust/issues/99012

Replies (2)