rust/tests/ui/check-cfg
bors 7585c62658 Auto merge of #119473 - Urgau:check-cfg-explicit-none, r=petrochenkov
Add explicit `none()` value variant in check-cfg

This PR adds an explicit none value variant in check-cfg values: `values(none())`.

Currently the only way to define the none variant is with an empty `values()` which means that if someone has a cfg that takes none and strings they need to use two invocations: `--check-cfg=cfg(foo) --check-cfg=cfg(foo, values("bar"))`.
Which would now be `--check-cfg=cfg(foo, values(none(),"bar"))`, this is simpler and easier to understand.

`--check-cfg=cfg(foo)`, `--check-cfg=cfg(foo, values())` and `--check-cfg=cfg(foo, values(none()))` would be equivalent.

*Another motivation for doing this is to make empty `values()` actually means no-values, but this is orthogonal to this PR and adding `none()` is sufficient in it-self.*

`@rustbot` label +F-check-cfg
r? `@petrochenkov`
2024-01-13 06:17:46 +00:00
..
allow-at-crate-level.rs MCP636: Adapt check-cfg tests to the new syntax 2023-10-13 13:51:03 +02:00
allow-macro-cfg.rs MCP636: Adapt check-cfg tests to the new syntax 2023-10-13 13:51:03 +02:00
allow-same-level.rs MCP636: Adapt check-cfg tests to the new syntax 2023-10-13 13:51:03 +02:00
allow-same-level.stderr Add more suggestion to unexpected cfg names and values 2023-12-13 17:48:04 +01:00
allow-top-level.rs MCP636: Adapt check-cfg tests to the new syntax 2023-10-13 13:51:03 +02:00
allow-upper-level.rs MCP636: Adapt check-cfg tests to the new syntax 2023-10-13 13:51:03 +02:00
cargo-feature.none.stderr Add check-cfg test for Cargo feature without value 2023-12-30 01:04:15 +01:00
cargo-feature.rs Add check-cfg test for Cargo feature without value 2023-12-30 01:04:15 +01:00
cargo-feature.some.stderr Fix invalid check-cfg Cargo feature diagnostic help 2023-12-30 01:06:03 +01:00
compact-names.rs MCP636: Adapt check-cfg tests to the new syntax 2023-10-13 13:51:03 +02:00
compact-names.stderr Add more suggestion to unexpected cfg names and values 2023-12-13 17:48:04 +01:00
compact-values.rs Avoid target_os and target_arch in some check-cfg tests 2023-12-09 11:59:46 +01:00
compact-values.stderr Exclude well known names from showing a suggestion in check-cfg 2024-01-12 18:47:05 +01:00
concat-values.rs MCP636: Adapt check-cfg tests to the new syntax 2023-10-13 13:51:03 +02:00
concat-values.stderr Add more suggestion to unexpected cfg names and values 2023-12-13 17:48:04 +01:00
diagnotics.cargo.stderr Add more suggestion to unexpected cfg names and values 2023-12-13 17:48:04 +01:00
diagnotics.rs Add more suggestion to unexpected cfg names and values 2023-12-13 17:48:04 +01:00
diagnotics.rustc.stderr Add more suggestion to unexpected cfg names and values 2023-12-13 17:48:04 +01:00
exhaustive-names-values.empty_cfg.stderr Exclude well known names from showing a suggestion in check-cfg 2024-01-12 18:47:05 +01:00
exhaustive-names-values.feature.stderr Exclude well known names from showing a suggestion in check-cfg 2024-01-12 18:47:05 +01:00
exhaustive-names-values.full.stderr Exclude well known names from showing a suggestion in check-cfg 2024-01-12 18:47:05 +01:00
exhaustive-names-values.rs Remove deprecated --check-cfg names() and values() syntax 2023-12-05 13:25:11 +01:00
exhaustive-names.rs Remove deprecated --check-cfg names() and values() syntax 2023-12-05 13:25:11 +01:00
exhaustive-names.stderr Add more suggestion to unexpected cfg names and values 2023-12-13 17:48:04 +01:00
exhaustive-values.empty_cfg.stderr Exclude well known names from showing a suggestion in check-cfg 2024-01-12 18:47:05 +01:00
exhaustive-values.rs Remove deprecated --check-cfg names() and values() syntax 2023-12-05 13:25:11 +01:00
exhaustive-values.without_names.stderr Exclude well known names from showing a suggestion in check-cfg 2024-01-12 18:47:05 +01:00
invalid-arguments.any_values.stderr Better guard against wrong input with check-cfg any() 2023-10-27 12:02:54 +02:00
invalid-arguments.anything_else.stderr MCP636: Adapt check-cfg tests to the new syntax 2023-10-13 13:51:03 +02:00
invalid-arguments.cfg_none.stderr Add explicit none() value variant in check-cfg 2024-01-09 19:03:06 +01:00
invalid-arguments.giberich.stderr MCP636: Adapt check-cfg tests to the new syntax 2023-10-13 13:51:03 +02:00
invalid-arguments.ident_in_values_1.stderr Add explicit none() value variant in check-cfg 2024-01-09 19:03:06 +01:00
invalid-arguments.ident_in_values_2.stderr Add explicit none() value variant in check-cfg 2024-01-09 19:03:06 +01:00
invalid-arguments.mixed_any.stderr MCP636: Adapt check-cfg tests to the new syntax 2023-10-13 13:51:03 +02:00
invalid-arguments.mixed_values_any.stderr MCP636: Adapt check-cfg tests to the new syntax 2023-10-13 13:51:03 +02:00
invalid-arguments.multiple_any.stderr MCP636: Adapt check-cfg tests to the new syntax 2023-10-13 13:51:03 +02:00
invalid-arguments.multiple_values_any.stderr MCP636: Adapt check-cfg tests to the new syntax 2023-10-13 13:51:03 +02:00
invalid-arguments.multiple_values.stderr MCP636: Adapt check-cfg tests to the new syntax 2023-10-13 13:51:03 +02:00
invalid-arguments.none_not_empty.stderr Add explicit none() value variant in check-cfg 2024-01-09 19:03:06 +01:00
invalid-arguments.not_empty_any.stderr MCP636: Adapt check-cfg tests to the new syntax 2023-10-13 13:51:03 +02:00
invalid-arguments.not_empty_values_any.stderr MCP636: Adapt check-cfg tests to the new syntax 2023-10-13 13:51:03 +02:00
invalid-arguments.rs Add explicit none() value variant in check-cfg 2024-01-09 19:03:06 +01:00
invalid-arguments.string_for_name_1.stderr MCP636: Adapt check-cfg tests to the new syntax 2023-10-13 13:51:03 +02:00
invalid-arguments.string_for_name_2.stderr MCP636: Adapt check-cfg tests to the new syntax 2023-10-13 13:51:03 +02:00
invalid-arguments.unknown_meta_item_1.stderr MCP636: Adapt check-cfg tests to the new syntax 2023-10-13 13:51:03 +02:00
invalid-arguments.unknown_meta_item_2.stderr MCP636: Adapt check-cfg tests to the new syntax 2023-10-13 13:51:03 +02:00
invalid-arguments.unknown_meta_item_3.stderr Add explicit none() value variant in check-cfg 2024-01-09 19:03:06 +01:00
invalid-arguments.unterminated.stderr Better guard against wrong input with check-cfg any() 2023-10-27 12:02:54 +02:00
invalid-arguments.values_any_before_ident.stderr MCP636: Adapt check-cfg tests to the new syntax 2023-10-13 13:51:03 +02:00
invalid-arguments.values_any_missing_values.stderr MCP636: Adapt check-cfg tests to the new syntax 2023-10-13 13:51:03 +02:00
mix.rs Remove deprecated --check-cfg names() and values() syntax 2023-12-05 13:25:11 +01:00
mix.stderr Add more suggestion to unexpected cfg names and values 2023-12-13 17:48:04 +01:00
my-awesome-platform.json Honor current target when checking conditional compilation values 2023-03-09 21:55:00 +01:00
no-expected-values.empty.stderr Exclude well known names from showing a suggestion in check-cfg 2024-01-12 18:47:05 +01:00
no-expected-values.mixed.stderr Exclude well known names from showing a suggestion in check-cfg 2024-01-12 18:47:05 +01:00
no-expected-values.rs Add explicit none() value variant in check-cfg 2024-01-09 19:03:06 +01:00
no-expected-values.simple.stderr Exclude well known names from showing a suggestion in check-cfg 2024-01-12 18:47:05 +01:00
order-independant.rs Remove deprecated --check-cfg names() and values() syntax 2023-12-05 13:25:11 +01:00
order-independant.values_after.stderr Add more suggestion to unexpected cfg names and values 2023-12-13 17:48:04 +01:00
order-independant.values_before.stderr Add more suggestion to unexpected cfg names and values 2023-12-13 17:48:04 +01:00
stmt-no-ice.rs MCP636: Adapt check-cfg tests to the new syntax 2023-10-13 13:51:03 +02:00
stmt-no-ice.stderr Add more suggestion to unexpected cfg names and values 2023-12-13 17:48:04 +01:00
unexpected-cfg-name.rs Remove deprecated --check-cfg names() and values() syntax 2023-12-05 13:25:11 +01:00
unexpected-cfg-name.stderr Add more suggestion to unexpected cfg names and values 2023-12-13 17:48:04 +01:00
unexpected-cfg-value.rs Remove deprecated --check-cfg names() and values() syntax 2023-12-05 13:25:11 +01:00
unexpected-cfg-value.stderr Add more suggestion to unexpected cfg names and values 2023-12-13 17:48:04 +01:00
unknown-values.rs MCP636: Adapt check-cfg tests to the new syntax 2023-10-13 13:51:03 +02:00
values-none.explicit.stderr Add explicit none() value variant in check-cfg 2024-01-09 19:03:06 +01:00
values-none.implicit.stderr Add explicit none() value variant in check-cfg 2024-01-09 19:03:06 +01:00
values-none.rs Add explicit none() value variant in check-cfg 2024-01-09 19:03:06 +01:00
values-target-json.rs Avoid target_os and target_arch in some check-cfg tests 2023-12-09 11:59:46 +01:00
well-known-names.rs Remove feature from the list of well known check-cfg name 2023-11-21 19:06:58 +01:00
well-known-names.stderr Add more suggestion to unexpected cfg names and values 2023-12-13 17:48:04 +01:00
well-known-values.rs Don't forget pure rustc target features in check-cfg 2023-12-14 14:50:32 +01:00
well-known-values.stderr Exclude well known names from showing a suggestion in check-cfg 2024-01-12 18:47:05 +01:00