diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-03-05 19:53:18 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-05 19:53:18 +0100 |
| commit | 640648b8932aa094b746c0de7012c7d2bd9955e8 (patch) | |
| tree | 1dd2527c92b684bbf0488da742f045b1ab510f1b /compiler/rustc_session/src | |
| parent | 96561a8fd134e8f2b205769a4fca03b392d9f484 (diff) | |
| parent | 9d9b26bca942dc4cf9cda0b8612bff715aebf7da (diff) | |
Rollup merge of #121202 - Urgau:check-cfg-limit-diagnostics, r=pnkfelix
Limit the number of names and values in check-cfg diagnostics The Rust for Linux [feedback](https://github.com/rust-lang/rust/issues/82450#issuecomment-1947462977) to the check-cfg Call for Testing, revealed a weakness in the check-cfg. They are unbounded and in the case RfL they have ~20k cfgs and having them printed (even once) is unbearable. This PR limits it to 35 (28 rustc well known + `feature` + `docsrs` + 5 custom) which feels like a good middle ground for regular users (i.e. Cargo users). When it goes over that limit print the N first with " and X more". ``@rustbot`` label +F-check-cfg
Diffstat (limited to 'compiler/rustc_session/src')
| -rw-r--r-- | compiler/rustc_session/src/options.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_session/src/options.rs b/compiler/rustc_session/src/options.rs index 42c9d5e10eb..55e1556cdf8 100644 --- a/compiler/rustc_session/src/options.rs +++ b/compiler/rustc_session/src/options.rs @@ -1565,6 +1565,8 @@ options! { "set options for branch target identification and pointer authentication on AArch64"), cf_protection: CFProtection = (CFProtection::None, parse_cfprotection, [TRACKED], "instrument control-flow architecture protection"), + check_cfg_all_expected: bool = (false, parse_bool, [UNTRACKED], + "show all expected values in check-cfg diagnostics (default: no)"), codegen_backend: Option<String> = (None, parse_opt_string, [TRACKED], "the backend to use"), collapse_macro_debuginfo: CollapseMacroDebuginfo = (CollapseMacroDebuginfo::Unspecified, |
