Module rustc_trans::saveUnstable
[-] [+]
[src]
Output a CSV file containing the output from rustc's analysis. The data is primarily designed to be used as input to the DXR tool, specifically its Rust plugin. It could also be used by IDEs or other code browsing, search, or cross-referencing tools.
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).
Recorder is used for recording the output in csv format. FmtStrs separates
the format of the output away from extracting it from the compiler.
DxrVisitor walks the AST and processes it.
Functions
process_crate |