tests/ui/cfg: add annotations for reference rules#153325
tests/ui/cfg: add annotations for reference rules#153325rust-bors[bot] merged 1 commit intorust-lang:mainfrom
Conversation
| //@ compile-flags: --cfg foo=1x | ||
| //@ reference: cfg.option-spec | ||
| //@ reference: cfg.option-name | ||
| //@ reference: cfg.option-key-value |
There was a problem hiding this comment.
Can you say why this includes cfg.option-spec and cfg.option-name? It looks like this test is just validating the error case when the value is not a valid string (which I think is covered by cfg.option-key-value).
There was a problem hiding this comment.
I figured that cfg.option-key-value was saying "here is how to use cfg with a key-value pair" and that cfg.option-spec (saying that cfg options are either names or key-value pairs) and cfg.option-name (allowing names) are all tested by confirming that something other than a key-value pair is not allowed. I would say that
validating the error case when the value is not a valid string
is not just cfg.option-key-value since I read cfg.option-key-value to describe one thing that is accepted (key-value pairs where the value is a string) but on its own that rule isn't enough to say that things like foo=1x are not accepted, only with all three rules do you get the exhaustiveness
7d98a51 to
226b4dd
Compare
|
Thanks! @bors r+ rollup |
Rollup of 4 pull requests Successful merges: - #148562 (In `Option::get_or_insert_with()`, forget the `None` instead of dropping it.) - #153325 (tests/ui/cfg: add annotations for reference rules) - #153621 (Remove `TyCtxt::node_span_lint` method) - #153627 (rustdoc-json: Improve docs for `ItemEnum::item_kind`)
This comment has been minimized.
This comment has been minimized.
…ompilation, r=ehuss tests/ui/cfg: add annotations for reference rules
|
💔 Test for c49e635 failed: CI. Failed job:
|
|
@bors retry |
Rollup of 4 pull requests Successful merges: - #148562 (In `Option::get_or_insert_with()`, forget the `None` instead of dropping it.) - #153325 (tests/ui/cfg: add annotations for reference rules) - #153621 (Remove `TyCtxt::node_span_lint` method) - #153627 (rustdoc-json: Improve docs for `ItemEnum::item_kind`)
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Rollup of 4 pull requests Successful merges: - #148562 (In `Option::get_or_insert_with()`, forget the `None` instead of dropping it.) - #153325 (tests/ui/cfg: add annotations for reference rules) - #153621 (Remove `TyCtxt::node_span_lint` method) - #153627 (rustdoc-json: Improve docs for `ItemEnum::item_kind`)
Rollup merge of #153325 - DanielEScherzer:test-references-conditional-compilation, r=ehuss tests/ui/cfg: add annotations for reference rules
r? ehuss
@rustbot label +A-docs