Crate ra_ap_sourcegen

Source
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§

CommentBlock
Location

Functions§

add_preamble
ensure_file_contents
Checks that the file has the specified contents. If that is not the case, updates the file and then fails the test.
list_files
list_rust_files
project_root
reformat