This was also partly made possible by the use of annotate-snippets-rs. https://crates.io/crates/annotate-snippets
That crate effectively started life as a copy of `rustc`'s own home grown renderer, quirks and all. Manish Goregaokar made the effort of introducing it as a dependency in `rustc` with the objective of eventually deprecating the custom one. But that objective remained elusive for years. It turns out that making a general purpose renderer is hard, and in the meantime I kept adding custom behavior into `rustc`'s renderer to account for the myriad corner cases that terminals expose us to (reminder that `rustc` separates Unicode families—for good reasons https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=4efa76f7003a125c3c2d6ef6356a3fd8). But after @muscraft took over the project, progress accelerated significantly. Little by little he whittled away all of the differences, all the corner cases and hacks and cruft that had accumulated over the years, significantly improved the codebase, to the point that we could switch `rustc` to use annotate-snippets-rs exclusively. Today, the `rustc` renderer has been removed, and All Is Right With The World.
Having the renderer in a separate repo meant that iterating on designs didn't require recompiling *all of `rustc`*, and that experiments could be done independently of what `rustc` needed.
#RustLang #Rust