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.



Checks that the file has the specified contents. If that is not the case, updates the file and then fails the test.