Rust compiler tests coverage

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

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 -

If anyone has done this before I would really appreciate some guidance.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.