Issues with `source-based-code-coverage` setup

Following along with the unstable book source-based-code-coverage
I'm using the nightly rustc (profiler enabled), with rustfilt. I want to
generate code coverage. I'm unable to generate the target file, demonstrated below:

cargo clean
RUSTFLAGS="-Zinstrument-coverage" cargo build #--example SOMEFILE # does not generate an output file in target/debug/examples/SOMEFILE
# uncommenting --example returns:  error: no example target named `SOMEFILE`
cargo profdata -- merge -sparse default.profraw -o d.profdata
# the following produces: error: target/debug/examples/SOMEFILE: Failed to load coverage: No such file or directory
cargo cov -- show -Xdemangler=rustfilt target/debug/examples/SOMEFILE \
-instr-profile=default.profdata -show-line-counts-or-regions \
-show-instantiations -name=add_quoted_string

Am I doing something dumb?

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.