Expand description
rust-analyzer relies heavily on source code generation.
Things like feature documentation or assist tests are implemented by
processing rust-analyzer’s own source code and generating the appropriate
output. See sourcegen_
tests in various crates.
This crate contains utilities to make this kind of source-gen easy.
Structs§
Functions§
- add_
preamble - ensure_
file_ contents - Checks that the
file
has the specifiedcontents
. If that is not the case, updates the file and then fails the test. - list_
files - list_
rust_ files - project_
root - reformat