rust/compiler
Matthias Krüger 8b9ef3b996
Rollup merge of #122226 - Zalathar:zcoverage-options, r=nnethercote
coverage: Remove or migrate all unstable values of `-Cinstrument-coverage`

(This PR was substantially overhauled from its original version, which migrated all of the existing unstable values intact.)

This PR takes the three nightly-only values that are currently accepted by `-Cinstrument-coverage`, completely removes two of them (`except-unused-functions` and `except-unused-generics`), and migrates the third (`branch`) over to a newly-introduced unstable flag `-Zcoverage-options`.

I have a few motivations for wanting to do this:

- It's unclear whether anyone actually uses the `except-unused-*` values, so this serves as an opportunity to either remove them, or prompt existing users to object to their removal.
- After #117199, the stable values of `-Cinstrument-coverage` treat it as a boolean-valued flag, so having nightly-only extra values feels out-of-place.
  - Nightly-only values also require extra ad-hoc code to make sure they aren't accidentally exposed to stable users.
- The new system allows multiple different settings to be toggled independently, which isn't possible in the current single-value system.
- The new system makes it easier to introduce new behaviour behind an unstable toggle, and then gather nightly-user feedback before possibly making it the default behaviour for all users.
- The new system also gives us a convenient place to put relatively-narrow options that won't ever be the default, but that nightly users might still want access to.
- It's likely that we will eventually want to give stable users more fine-grained control over coverage instrumentation. The new flag serves as a prototype of what that stable UI might eventually look like.

The `branch` option is a placeholder that currently does nothing. It will be used by #122322 to opt into branch coverage instrumentation.

---

I see `-Zcoverage-options` as something that will exist more-or-less indefinitely, though individual sub-options might come and go as appropriate. I think there will always be some demand for nightly-only toggles, so I don't see `-Zcoverage-options` itself ever being stable, though we might eventually stabilize something similar to it.
2024-03-13 06:41:22 +01:00
..
rustc
rustc_abi Rollup merge of #121382 - nnethercote:rework-untranslatable_diagnostic-lint, r=davidtwco 2024-03-06 22:02:46 +01:00
rustc_arena rename ptr::invalid -> ptr::without_provenance 2024-02-21 20:15:52 +01:00
rustc_ast Rollup merge of #119365 - nbdd0121:asm-goto, r=Amanieu 2024-03-08 08:19:17 +01:00
rustc_ast_ir Fix typo in VisitorResult 2024-03-08 23:20:29 -05:00
rustc_ast_lowering Change DefKind::Static to a struct variant 2024-03-12 05:53:46 +00:00
rustc_ast_passes Rename AddToDiagnostic as Subdiagnostic. 2024-03-11 10:04:49 +11:00
rustc_ast_pretty Rollup merge of #121584 - klensy:itertools-up, r=Mark-Simulacrum 2024-03-09 21:40:08 +01:00
rustc_attr Rename IntoDiagnostic as Diagnostic. 2024-03-11 09:15:09 +11:00
rustc_baked_icu_data
rustc_borrowck Eliminate DefiningAnchor::Error, it is indistinguishable from DefiningAnchor::Bind with an empty list 2024-03-11 17:19:37 +00:00
rustc_builtin_macros Rename AddToDiagnostic as Subdiagnostic. 2024-03-11 10:04:49 +11:00
rustc_codegen_cranelift Rollup merge of #121840 - oli-obk:freeze, r=dtolnay 2024-03-11 03:47:19 -04:00
rustc_codegen_gcc Some comment nits 2024-03-12 08:51:20 +00:00
rustc_codegen_llvm Rollup merge of #122226 - Zalathar:zcoverage-options, r=nnethercote 2024-03-13 06:41:22 +01:00
rustc_codegen_ssa Auto merge of #122220 - saethlin:ppc-can-into-atomicptr, r=oli-obk 2024-03-13 00:03:50 +00:00
rustc_const_eval Exhaustively match on the mutability and nestedness 2024-03-12 05:53:47 +00:00
rustc_data_structures Rollup merge of #120976 - matthiaskrgr:constify_TL_statics, r=lcnr 2024-03-04 22:16:30 +01:00
rustc_driver
rustc_driver_impl Auto merge of #122218 - Zoxc:no-interleave-panics, r=michaelwoerister 2024-03-12 14:01:38 +00:00
rustc_error_codes Improve error message for opaque captures 2024-03-08 19:08:13 +00:00
rustc_error_messages Rename SubdiagnosticMessage as SubdiagMessage. 2024-03-05 12:14:49 +11:00
rustc_errors Rollup merge of #122194 - oli-obk:stash_delay_bug, r=nnethercote 2024-03-12 06:29:03 +01:00
rustc_expand Rollup merge of #121382 - nnethercote:rework-untranslatable_diagnostic-lint, r=davidtwco 2024-03-06 22:02:46 +01:00
rustc_feature Rollup merge of #121840 - oli-obk:freeze, r=dtolnay 2024-03-11 03:47:19 -04:00
rustc_fluent_macro Rename SubdiagnosticMessage as SubdiagMessage. 2024-03-05 12:14:49 +11:00
rustc_fs_util Invert diagnostic lints. 2024-02-06 13:12:33 +11:00
rustc_graphviz Invert diagnostic lints. 2024-02-06 13:12:33 +11:00
rustc_hir Some comment nits 2024-03-12 08:51:20 +00:00
rustc_hir_analysis Manual rustfmt 2024-03-12 05:53:46 +00:00
rustc_hir_pretty Add asm label support to AST and HIR 2024-02-24 18:49:39 +00:00
rustc_hir_typeck Change DefKind::Static to a struct variant 2024-03-12 05:53:46 +00:00
rustc_incremental Rename all ParseSess variables/fields/lifetimes as psess. 2024-03-05 08:11:45 +11:00
rustc_index doc: Add better explanation 2024-03-06 16:54:42 +01:00
rustc_index_macros Step all bootstrap cfgs forward 2024-02-08 07:44:34 -05:00
rustc_infer Change DefKind::Static to a struct variant 2024-03-12 05:53:46 +00:00
rustc_interface Rollup merge of #122226 - Zalathar:zcoverage-options, r=nnethercote 2024-03-13 06:41:22 +01:00
rustc_lexer Invert diagnostic lints. 2024-02-06 13:12:33 +11:00
rustc_lint Allow multiple impl Into<{D,Subd}iagMessage> parameters in a function. 2024-03-11 16:42:10 +11:00
rustc_lint_defs Declare new lint 2024-03-09 01:13:42 +01:00
rustc_llvm llvm-wrapper: adapt for LLVM API changes 2024-03-12 12:39:25 +00:00
rustc_log rustc_log: expose tracing-tree "wraparound" in an env var 2024-03-03 12:33:26 +01:00
rustc_macros Rename diagnostic derive things. 2024-03-11 10:06:34 +11:00
rustc_metadata s/mt/mutability/ 2024-03-12 05:53:46 +00:00
rustc_middle s/mt/mutability/ 2024-03-12 05:53:46 +00:00
rustc_mir_build Rollup merge of #121908 - Nadrieril:dynamic-variant-collection, r=matthewjasper 2024-03-13 06:41:21 +01:00
rustc_mir_dataflow Distinguish between library and lang UB in assert_unsafe_precondition 2024-03-08 18:53:58 -05:00
rustc_mir_transform Ensure nested allocations in statics do not get deduplicated 2024-03-12 05:53:46 +00:00
rustc_monomorphize Rollup merge of #122226 - Zalathar:zcoverage-options, r=nnethercote 2024-03-13 06:41:22 +01:00
rustc_next_trait_solver Allow a way to add constructors for rustc_type_ir types 2024-03-04 15:39:59 +00:00
rustc_parse Rollup merge of #122152 - wutchzone:120892, r=fmease 2024-03-11 09:29:35 -07:00
rustc_parse_format remove a couple of redundant clones 2024-02-17 12:46:18 +01:00
rustc_passes Ensure nested allocations in statics do not get deduplicated 2024-03-12 05:53:46 +00:00
rustc_pattern_analysis DeconstructedPat.data is always present now 2024-03-11 04:38:57 +01:00
rustc_privacy Change DefKind::Static to a struct variant 2024-03-12 05:53:46 +00:00
rustc_query_impl Verify that query keys result in unique dep nodes 2024-03-12 05:31:41 +01:00
rustc_query_system Rollup merge of #122245 - saethlin:check-dep-graph-size, r=petrochenkov 2024-03-12 09:04:00 -07:00
rustc_resolve Manual rustfmt 2024-03-12 05:53:46 +00:00
rustc_serialize Replace NonZero::<_>::new with NonZero::new. 2024-02-15 08:09:42 +01:00
rustc_session Rollup merge of #122226 - Zalathar:zcoverage-options, r=nnethercote 2024-03-13 06:41:22 +01:00
rustc_smir Rollup merge of #122203 - adpaco-aws:smir-intrinsic-name, r=celinval 2024-03-13 06:41:21 +01:00
rustc_span Ensure nested allocations in statics do not get deduplicated 2024-03-12 05:53:46 +00:00
rustc_symbol_mangling Rename IntoDiagnostic as Diagnostic. 2024-03-11 09:15:09 +11:00
rustc_target Auto merge of #122170 - alexcrichton:rename-wasi-threads, r=petrochenkov 2024-03-12 08:30:46 +00:00
rustc_trait_selection Fix discriminant_kind copy paste from the pointee trait case 2024-03-12 14:37:22 +03:00
rustc_traits Merge check_mod_impl_wf and check_mod_type_wf 2024-03-07 06:27:09 +00:00
rustc_transmute bump itertools to 0.12 2024-03-08 12:34:05 +03:00
rustc_ty_utils Rollup merge of #122366 - oli-obk:opaques_defined_by_overflow, r=lcnr 2024-03-12 09:04:02 -07:00
rustc_type_ir Remove Ord from ClosureKind 2024-03-09 21:16:43 +08:00
stable_mir Rollup merge of #122203 - adpaco-aws:smir-intrinsic-name, r=celinval 2024-03-13 06:41:21 +01:00