rust/compiler
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
..
rustc Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_abi Fix rustc_abi build on stable 2024-01-16 21:15:31 +01:00
rustc_arena Fix Stable trait and its impls to work with the new with_tables 2024-01-19 09:42:51 +00:00
rustc_ast Pack the u128 in LitKind::Int 2024-01-19 20:10:39 -08:00
rustc_ast_lowering Pack the u128 in LitKind::Int 2024-01-19 20:10:39 -08:00
rustc_ast_passes add help message for exclusive_range_pattern error 2024-01-19 13:38:24 -05:00
rustc_ast_pretty Add PatKind::Err 2024-01-17 03:14:16 +01:00
rustc_attr Pack the u128 in LitKind::Int 2024-01-19 20:10:39 -08:00
rustc_baked_icu_data Bump cfg(bootstrap)s 2023-11-15 19:41:28 -05:00
rustc_borrowck Auto merge of #116152 - cjgillot:unchunck, r=nnethercote 2024-01-23 11:56:30 +00:00
rustc_builtin_macros Rollup merge of #120183 - Zalathar:test-closure, r=compiler-errors 2024-01-23 21:53:58 +01:00
rustc_codegen_cranelift Do not normalize closure signature when building FnOnce shim 2024-01-22 16:50:30 +00:00
rustc_codegen_gcc Rename {create,emit}_warning as {create,emit}_warn. 2024-01-10 07:33:06 +11:00
rustc_codegen_llvm LLVM 18 x86 data layout update 2024-01-19 10:52:01 +01:00
rustc_codegen_ssa Rollup merge of #120139 - compiler-errors:fnonce-shim, r=BoxyUwU 2024-01-23 21:53:56 +01:00
rustc_const_eval Rollup merge of #120139 - compiler-errors:fnonce-shim, r=BoxyUwU 2024-01-23 21:53:56 +01:00
rustc_data_structures Auto merge of #120080 - cuviper:128-align-packed, r=nikic 2024-01-22 13:08:19 +00:00
rustc_driver Bump cfg(bootstrap)s 2023-11-15 19:41:28 -05:00
rustc_driver_impl Replace TrimmedDefPaths with a bool. 2024-01-15 09:16:14 +11:00
rustc_error_codes Stabilize simple offset_of 2024-01-19 20:38:51 +00:00
rustc_error_messages Remove rustc_error_messages/messages.ftl. 2023-11-26 08:37:27 +11:00
rustc_errors Tweak error counting. 2024-01-22 10:14:01 +11:00
rustc_expand Pack the u128 in LitKind::Int 2024-01-19 20:10:39 -08:00
rustc_feature Revert "Auto merge of #118133 - Urgau:stabilize_trait_upcasting, r=WaffleLapkin" 2024-01-22 14:24:31 +00:00
rustc_fluent_macro annotate-snippets: update to 0.10 2024-01-07 16:53:32 +03:00
rustc_fs_util Clean up rustc_*/Cargo.toml. 2023-10-30 08:46:02 +11:00
rustc_graphviz remove unused pub fn 2023-11-23 14:11:02 +03:00
rustc_hir Rollup merge of #120143 - compiler-errors:consolidate-instance-resolve-for-coroutines, r=oli-obk 2024-01-22 22:12:08 +01:00
rustc_hir_analysis Rollup merge of #119766 - oli-obk:split_tait_and_atpit, r=compiler-errors 2024-01-23 21:53:56 +01:00
rustc_hir_pretty Add PatKind::Err 2024-01-17 03:14:16 +01:00
rustc_hir_typeck Auto merge of #120017 - nnethercote:lint-api, r=oli-obk 2024-01-23 00:06:57 +00:00
rustc_incremental Tweak error counting. 2024-01-22 10:14:01 +11:00
rustc_index Remove uses of HybridBitSet. 2024-01-22 22:53:20 +00:00
rustc_index_macros Restrict access to the private field of newtype indexes 2024-01-19 15:38:47 +00:00
rustc_infer Make generic const type mismatches not hide trait impls from the trait solver 2024-01-22 13:23:45 +00:00
rustc_interface Rollup merge of #120159 - jyn514:track-verbose, r=wesleywiser 2024-01-22 22:12:09 +01:00
rustc_lexer Rollup merge of #118639 - fmease:deny-features-in-stable-rustc-crates, r=WaffleLapkin 2024-01-22 16:54:56 +01:00
rustc_lint Auto merge of #120017 - nnethercote:lint-api, r=oli-obk 2024-01-23 00:06:57 +00:00
rustc_lint_defs Rollup merge of #119948 - asquared31415:unsafe_op_in_unsafe_fn_fix, r=TaKO8Ki 2024-01-22 16:13:28 +01:00
rustc_llvm Revert "Auto merge of #113923 - DianQK:restore-no-builtins-lto, r=pnkfelix" 2024-01-12 18:23:04 +08:00
rustc_log rustc_log: provide a way to init logging based on the values, not names, of the env vars 2023-11-11 15:24:33 +01:00
rustc_macros Rename LintContext::struct_span_lint as LintContext::span_lint. 2024-01-23 07:59:45 +11:00
rustc_metadata Rollup merge of #119815 - nagisa:nagisa/polishes-libloading-use-somewhat, r=bjorn3 2024-01-19 19:27:00 +01:00
rustc_middle Rollup merge of #120139 - compiler-errors:fnonce-shim, r=BoxyUwU 2024-01-23 21:53:56 +01:00
rustc_mir_build Rollup merge of #120171 - cjgillot:jump-threading-assume-assert, r=tmiasko 2024-01-23 21:53:57 +01:00
rustc_mir_dataflow Use a plain bitset for liveness analyses. 2024-01-22 23:18:45 +00:00
rustc_mir_transform Rollup merge of #120171 - cjgillot:jump-threading-assume-assert, r=tmiasko 2024-01-23 21:53:57 +01:00
rustc_monomorphize Rollup merge of #120139 - compiler-errors:fnonce-shim, r=BoxyUwU 2024-01-23 21:53:56 +01:00
rustc_next_trait_solver Remove movability from TyKind::Coroutine 2023-12-28 16:35:01 +00:00
rustc_parse Rollup merge of #120063 - clubby789:remove-box-handling, r=Nilstrieb 2024-01-20 20:06:34 +01:00
rustc_parse_format Rollup merge of #118639 - fmease:deny-features-in-stable-rustc-crates, r=WaffleLapkin 2024-01-22 16:54:56 +01:00
rustc_passes Rename TyCtxt::emit_spanned_lint as TyCtxt::emit_node_span_lint. 2024-01-23 08:09:05 +11:00
rustc_pattern_analysis Rename TyCtxt::emit_spanned_lint as TyCtxt::emit_node_span_lint. 2024-01-23 08:09:05 +11:00
rustc_privacy Rename TyCtxt::emit_spanned_lint as TyCtxt::emit_node_span_lint. 2024-01-23 08:09:05 +11:00
rustc_query_impl Update measureme crate to version 11 2024-01-13 16:32:03 +01:00
rustc_query_system Tweak error counting. 2024-01-22 10:14:01 +11:00
rustc_resolve Rollup merge of #119369 - bvanjoi:fix-119301, r=petrochenkov 2024-01-22 16:13:25 +01:00
rustc_serialize Rollup merge of #117561 - tgross35:split-array, r=scottmcm 2024-01-19 19:26:59 +01:00
rustc_session Auto merge of #120017 - nnethercote:lint-api, r=oli-obk 2024-01-23 00:06:57 +00:00
rustc_smir Do not normalize closure signature when building FnOnce shim 2024-01-22 16:50:30 +00:00
rustc_span Rollup merge of #120171 - cjgillot:jump-threading-assume-assert, r=tmiasko 2024-01-23 21:53:57 +01:00
rustc_symbol_mangling Rename consuming chaining methods on DiagnosticBuilder. 2024-01-10 07:40:00 +11:00
rustc_target rustc: implement support for riscv32im_risc0_zkvm_elf 2024-01-22 10:07:36 -08:00
rustc_trait_selection Auto merge of #120017 - nnethercote:lint-api, r=oli-obk 2024-01-23 00:06:57 +00:00
rustc_traits Correctly handle normalization in implied bounds 2024-01-17 21:27:34 -05:00
rustc_transmute Fix an ICE that occurs after an error has already been reported 2024-01-09 16:09:30 +00:00
rustc_ty_utils Rollup merge of #120139 - compiler-errors:fnonce-shim, r=BoxyUwU 2024-01-23 21:53:56 +01:00
rustc_type_ir Restrict access to the private field of newtype indexes 2024-01-19 15:38:47 +00:00
stable_mir Make the remaining "private" fields actually private 2024-01-19 16:37:50 +00:00