rust/compiler/rustc_builtin_macros
León Orell Valerian Liehr ecb8702308
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.
2024-01-23 21:53:58 +01:00
..
src Rollup merge of #120183 - Zalathar:test-closure, r=compiler-errors 2024-01-23 21:53:58 +01:00
Cargo.toml Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
messages.ftl Keep fluent slugs in alphabetical order 2023-10-05 16:17:32 +02:00