-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
check-cfg tests are prone to merge conflicts #135995
Copy link
Copy link
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-testsuiteArea: The testsuite used to check the correctness of rustcArea: The testsuite used to check the correctness of rustcF-check-cfg--check-cfg--check-cfgT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-testsuiteArea: The testsuite used to check the correctness of rustcArea: The testsuite used to check the correctness of rustcF-check-cfg--check-cfg--check-cfgT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Right now, the tests in
tests/ui/check-cfg/contain every built-in config known to the compiler, like so:rust/tests/ui/check-cfg/allow-same-level.stderr
Line 7 in 061ee95
this means they have to be updated each time a new builtin cfg is added, which is annoying, prone to merge conflicts, and distracts from what the test is actually doing. Also, it's just not a very good diagnostic? If you name a check-cfg something the compiler doesn't know, an exhaustive list of things it does know is probably not the thing you want.
I suggest one or more of the following:
rust/compiler/rustc_lint/src/early/diagnostics/check_cfg.rs
Line 143 in 061ee95
rust/compiler/rustc_lint/src/early/diagnostics/check_cfg.rs
Line 206 in 061ee95
@rustbot label A-testsuite A-diagnostics F-check-cfg