about summary refs log tree commit diff
path: root/tests/codegen/integer-overflow.rs
diff options
context:
space:
mode:
authorLeón Orell Valerian Liehr <me@fmease.dev>2024-01-23 21:53:58 +0100
committerGitHub <noreply@github.com>2024-01-23 21:53:58 +0100
commitecb87023088e7aaf02991d9ab59f4aeb87a2b9c1 (patch)
tree4d28c55b678d6c6deaf00150fec4e3f102742edf /tests/codegen/integer-overflow.rs
parent6cca9b33eca9d6a0344b643021706ea2a3d48dfb (diff)
parent6d7e80c5bc3cc3b176834322afc50dc8dd100599 (diff)
downloadrust-ecb87023088e7aaf02991d9ab59f4aeb87a2b9c1.tar.gz
rust-ecb87023088e7aaf02991d9ab59f4aeb87a2b9c1.zip
Rollup merge of #120183 - Zalathar:test-closure, r=compiler-errors
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.
Diffstat (limited to 'tests/codegen/integer-overflow.rs')
0 files changed, 0 insertions, 0 deletions