mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
ecb8702308
Add `#[coverage(off)]` to closures introduced by `#[test]` and `#[bench]` These closures are an internal implementation detail of the `#[test]` and `#[bench]` attribute macros, so from a user perspective there is no reason to instrument them for coverage. Skipping them makes coverage reports slightly cleaner, and will also allow other changes to span processing during coverage instrumentation, without having to worry about how they affect the `#[test]` macro. The `#[coverage(off)]` attribute has no effect when `-Cinstrument-coverage` is not used. Fixes #120046. --- Note that this PR has no effect on the user-written function that has the `#[test]` attribute attached to it. That function will still be instrumented as normal. |
||
---|---|---|
.. | ||
alloc | ||
backtrace@6145fe6bac | ||
core | ||
panic_abort | ||
panic_unwind | ||
portable-simd | ||
proc_macro | ||
profiler_builtins | ||
rtstartup | ||
rustc-std-workspace-alloc | ||
rustc-std-workspace-core | ||
rustc-std-workspace-std | ||
std | ||
stdarch@f4528dd6e8 | ||
sysroot | ||
test | ||
unwind |