[][src]Module rustc_save_analysis::dump_visitor

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

Write the output of rustc's analysis to an implementor of Dump.

Dumping the analysis is implemented by walking the AST and getting a bunch of info out from all over the place. We use Def IDs to identify objects. The tricky part is getting syntactic (span, source text) and semantic (reference Def IDs) information for parts of expressions which the compiler has discarded. E.g., in a path foo::bar::baz, the compiler only keeps a span for the whole path and a reference to baz, but we want spans and references for all three idents.

SpanUtils is used to manipulate spans. In particular, to extract sub-spans from spans (e.g., the span for bar from the above example path). DumpVisitor walks the AST and processes it, and JsonDumper is used for recording the output.

Structs

DumpVisitor [
Experimental
]