What is Rust doing behind the scenes?
docs.rs
docs.rs
This tool stands on the shoulders of giants. To work its magic, it runs the following commands:
rustc -Zinspect=hir, for retrieving the HIR. rustfmt, for formatting the output. prettyprint, for syntax-highlighting, which is just a wrapper around the awesome syntect and bat crates.