Closed dnaka91 closed 1 year ago
upstream bug report: https://github.com/rust-lang/rust/issues/110486
This sounds like a bug in the way the compiler handles macros, but action may be needed on the tracing or cargo-llvm-cov side to finally work around the problem. (Or maybe some llvm-cov flags already handles this, something like -show-expansions=false -- we currently set that flag to true)
Thank you for the quick reply.
Tried playing with a few flags to rust-cov
but none of them had an effect. But well, I'm not really sure what I'm doing there, as I don't know much about the llvm-cov tools.
I'll follow the bug report for any progress on this. Should I close this issue or leave it open?
I also confirmed that -show-expansions=false
doesn't fix this.
Closing in favor of upstream bug report for now.
I noticed that some of my functions are missing line information when they're processed with the
tracing::instrument
macro. When I look at the HTML report, the source code is there of course, but most of the lines are neither detected as covered nor uncovered.As soon as I remove the macro, they're detected properly again. I understand macros are always tricky to handle, and I wonder whether this is something that's better reported on the tracing repo's issue tracker?
For now, I can work around it as follows: