Closed
Description
Right now, the tests in tests/ui/check-cfg/
contain every built-in config known to the compiler, like so:
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:
- Add a limit for the number of cfgs we will suggest at once, and change the diagnostic to say "... and N more cfgs" when it truncates. That would go around here: and here:
- Normalize the output so we don't actually see the builtin cfg itself, just the diagnostic around it.
@rustbot label A-testsuite A-diagnostics F-check-cfg