-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle no values cfgs with --print=check-cfg
#125818
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rustbot
added
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
labels
May 31, 2024
Some changes occurred in run-make tests. cc @jieyouxu |
jieyouxu
reviewed
May 31, 2024
jhpratt
added a commit
to jhpratt/rust
that referenced
this pull request
Jun 1, 2024
…t, r=jieyouxu Refactor `--print=check-cfg` test *as asked in rust-lang#125818 (comment) r? `@jieyouxu`
jhpratt
added a commit
to jhpratt/rust
that referenced
this pull request
Jun 1, 2024
…t, r=jieyouxu Refactor `--print=check-cfg` test *as asked in rust-lang#125818 (comment) r? ``@jieyouxu``
jhpratt
added a commit
to jhpratt/rust
that referenced
this pull request
Jun 1, 2024
…t, r=jieyouxu Refactor `--print=check-cfg` test *as asked in rust-lang#125818 (comment) r? ```@jieyouxu```
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Jun 1, 2024
…t, r=jieyouxu Refactor `--print=check-cfg` test *as asked in rust-lang#125818 (comment) r? ````@jieyouxu````
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Jun 1, 2024
…t, r=jieyouxu Refactor `--print=check-cfg` test *as asked in rust-lang#125818 (comment) r? `````@jieyouxu`````
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Jun 1, 2024
…t, r=jieyouxu Refactor `--print=check-cfg` test *as asked in rust-lang#125818 (comment) r? ``````@jieyouxu``````
fmease
added a commit
to fmease/rust
that referenced
this pull request
Jun 1, 2024
…t, r=jieyouxu Refactor `--print=check-cfg` test *as asked in rust-lang#125818 (comment) r? ```````@jieyouxu```````
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jun 2, 2024
… r=jieyouxu Refactor `--print=check-cfg` test *as asked in rust-lang#125818 (comment) r? `@jieyouxu`
This comment was marked as resolved.
This comment was marked as resolved.
Urgau
force-pushed
the
print-check-cfg-no-values
branch
from
June 2, 2024 09:49
2a4c6b3
to
f58bf91
Compare
@bors r+ rollup |
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Jun 3, 2024
Noratrieb
added a commit
to Noratrieb/rust
that referenced
this pull request
Jun 4, 2024
…=petrochenkov Handle no values cfgs with `--print=check-cfg` This PR fix a bug with `--print=check-cfg`, where no values cfgs where not printed since we only printed cfgs that had at least one values. The representation I choose is `CFG=`, since it doesn't correspond to any valid config, it also IMO nicely complements the `values()` (to indicate no values). Representing the absence of value by the absence of the value. So for `cfg(feature, values())` we would print `feature=`. I also added the missing tracking issue number in the doc. r? `@petrochenkov`
Noratrieb
added a commit
to Noratrieb/rust
that referenced
this pull request
Jun 4, 2024
…=petrochenkov Handle no values cfgs with `--print=check-cfg` This PR fix a bug with `--print=check-cfg`, where no values cfgs where not printed since we only printed cfgs that had at least one values. The representation I choose is `CFG=`, since it doesn't correspond to any valid config, it also IMO nicely complements the `values()` (to indicate no values). Representing the absence of value by the absence of the value. So for `cfg(feature, values())` we would print `feature=`. I also added the missing tracking issue number in the doc. r? ``@petrochenkov``
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jun 4, 2024
Rollup of 9 pull requests Successful merges: - rust-lang#122804 (Item bounds can reference self projections and still be object safe) - rust-lang#124486 (Add tracking issue and unstable book page for `"vectorcall"` ABI) - rust-lang#125504 (Change pedantically incorrect OnceCell/OnceLock wording) - rust-lang#125608 (Avoid follow-up errors if the number of generic parameters already doesn't match) - rust-lang#125690 (ARM Target Docs Update) - rust-lang#125750 (Align `Term` methods with `GenericArg` methods, add `Term::expect_*`) - rust-lang#125818 (Handle no values cfgs with `--print=check-cfg`) - rust-lang#125909 (rustdoc: add a regression test for a former blanket impl synthesis ICE) - rust-lang#125919 (Remove stray "this") r? `@ghost` `@rustbot` modify labels: rollup
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jun 4, 2024
Rollup of 8 pull requests Successful merges: - rust-lang#124486 (Add tracking issue and unstable book page for `"vectorcall"` ABI) - rust-lang#125504 (Change pedantically incorrect OnceCell/OnceLock wording) - rust-lang#125608 (Avoid follow-up errors if the number of generic parameters already doesn't match) - rust-lang#125690 (ARM Target Docs Update) - rust-lang#125750 (Align `Term` methods with `GenericArg` methods, add `Term::expect_*`) - rust-lang#125818 (Handle no values cfgs with `--print=check-cfg`) - rust-lang#125909 (rustdoc: add a regression test for a former blanket impl synthesis ICE) - rust-lang#125919 (Remove stray "this") r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jun 4, 2024
Rollup merge of rust-lang#125818 - Urgau:print-check-cfg-no-values, r=petrochenkov Handle no values cfgs with `--print=check-cfg` This PR fix a bug with `--print=check-cfg`, where no values cfgs where not printed since we only printed cfgs that had at least one values. The representation I choose is `CFG=`, since it doesn't correspond to any valid config, it also IMO nicely complements the `values()` (to indicate no values). Representing the absence of value by the absence of the value. So for `cfg(feature, values())` we would print `feature=`. I also added the missing tracking issue number in the doc. r? ```@petrochenkov```
3 tasks
flip1995
pushed a commit
to flip1995/rust-clippy
that referenced
this pull request
Jun 28, 2024
Refactor `--print=check-cfg` test *as asked in rust-lang/rust#125818 (comment) r? `@jieyouxu`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fix a bug with
--print=check-cfg
, where no values cfgs where not printed since we only printed cfgs that had at least one values.The representation I choose is
CFG=
, since it doesn't correspond to any valid config, it also IMO nicely complements thevalues()
part of--check-cfg
(to indicate no values). Representing the absence of value by the absence of value.So for
cfg(feature, values())
we would printfeature=
.I also added the missing tracking issue number in the doc.
r? @petrochenkov