Skip to content

rustc: Implement a new --print cfg flag #31278

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Feb 9, 2016

Conversation

alexcrichton
Copy link
Member

This commit is an implementation of the new compiler flags required by RFC
1361
. This specifically adds a new cfg option to the --print flag to
the compiler. This new directive will print the defined #[cfg] directives by
the compiler for the target in question.

@rust-highfive
Copy link
Contributor

r? @brson

(rust_highfive has picked a reviewer for you, use r? to override)

@brson brson added the relnotes Marks issues that should be documented in the release notes of the next release. label Feb 2, 2016
@brson
Copy link
Contributor

brson commented Feb 8, 2016

If you try to write it down in the source as well it fails:

That's super surprising. rustc --cfg "foo(bar)" is accepted.

@brson
Copy link
Contributor

brson commented Feb 8, 2016

Please add an unreachable assertion to the MetaList case and a comment explaining why its impossible, then r=me.

@alexcrichton
Copy link
Member Author

@bors: r=brson e50eac5

bors added a commit that referenced this pull request Feb 8, 2016
This commit is an implementation of the new compiler flags required by [RFC
1361][rfc]. This specifically adds a new `cfg` option to the `--print` flag to
the compiler. This new directive will print the defined `#[cfg]` directives by
the compiler for the target in question.

[rfc]: https://github.com/rust-lang/rfcs/blob/master/text/1361-cargo-cfg-dependencies
@bors
Copy link
Collaborator

bors commented Feb 8, 2016

⌛ Testing commit e50eac5 with merge 798e3c6...

@bors
Copy link
Collaborator

bors commented Feb 8, 2016

💔 Test failed - auto-win-gnu-64-opt

This commit is an implementation of the new compiler flags required by [RFC
1361][rfc]. This specifically adds a new `cfg` option to the `--print` flag to
the compiler. This new directive will print the defined `#[cfg]` directives by
the compiler for the target in question.

[rfc]: https://github.com/rust-lang/rfcs/blob/master/text/1361-cargo-cfg-dependencies.md
@alexcrichton
Copy link
Member Author

@bors: r=brson a1ffe6b

@bors
Copy link
Collaborator

bors commented Feb 9, 2016

⌛ Testing commit a1ffe6b with merge 75271d8...

bors added a commit that referenced this pull request Feb 9, 2016
This commit is an implementation of the new compiler flags required by [RFC
1361][rfc]. This specifically adds a new `cfg` option to the `--print` flag to
the compiler. This new directive will print the defined `#[cfg]` directives by
the compiler for the target in question.

[rfc]: https://github.com/rust-lang/rfcs/blob/master/text/1361-cargo-cfg-dependencies
@bors bors merged commit a1ffe6b into rust-lang:master Feb 9, 2016
@alexcrichton alexcrichton deleted the print-cfg branch February 12, 2016 20:56
ranma42 added a commit to ranma42/rust that referenced this pull request Mar 2, 2016
The `--print` flag was extended in rust-lang#31278 to accept `cfg`, but the
usage message was not updated.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
relnotes Marks issues that should be documented in the release notes of the next release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants