I'd like to check what percentage and the number of lines covered by the Rust compiler's tests, and number of lines to the rustc compiler used when compiling some file, say x.rs
.
I've built the compiler from source, and am trying to use the nightly flag -Z instrument-coverage
- but I'm not sure at which stage I should use it. Ideally I'd like to be able to invoke the cargo or rustc binary and be able to see how much of the rustc source code I've covered by compiling some file.
For reference - https://doc.rust-lang.org/nightly/unstable-book/compiler-flags/instrument-coverage.html
If anyone has done this before I would really appreciate some guidance.