[Rustc Book] Explain --cfg's arguments#55111
Merged
bors merged 2 commits intorust-lang:masterfrom Oct 18, 2018
Merged
Conversation
Contributor
|
“The grain” here isn’t intentional, it’s an artifact of me just trying to get the basics in place, and not having done much else yet.
… On Oct 15, 2018, at 9:40 PM, Ryan Scheel ***@***.***> wrote:
I removed this from the reference since it's rustc specific, and noticed it wasn't well documented on the page that should document it well. It does seem to go against the grain of one line per command line flag though.
r? @GuillaumeGomez
You can view, comment on, or merge this pull request online at:
#55111
Commit Summary
[Rustc Book] Explain --cfg's arguments
File Changes
M src/doc/rustc/src/command-line-arguments.md (5)
Patch Links:
https://github.com/rust-lang/rust/pull/55111.patch
https://github.com/rust-lang/rust/pull/55111.diff
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
|
|
||
| The value can either be a single identifier or two identifiers separated by `=`. | ||
|
|
||
| For examples, `--cfg 'verbose'` or `--cfg 'feature=serde'`. These correspond |
Contributor
There was a problem hiding this comment.
--cfg feature=serde is incorrect, you need a string literal for the value - --cfg feature = "serde".
Contributor
There was a problem hiding this comment.
--cfg argument (after shell preprocessing, etc) is literally a meta-item, same thing as in #[cfg(feature = "serde")] and with the same restrictions.
Contributor
Author
There was a problem hiding this comment.
Whoops. Thought I put those quotes in there. Should have just copy-pasted from the cargo build --verbose output...
Member
|
Seems good to me. r=me once CI is green. Thanks! |
Member
|
Travis is green. @bors r=GuillaumeGomez rollup |
Collaborator
|
📌 Commit 8c186af has been approved by |
kennytm
added a commit
to kennytm/rust
that referenced
this pull request
Oct 18, 2018
…illaumeGomez [Rustc Book] Explain --cfg's arguments I removed this from the reference since it's rustc specific, and noticed it wasn't well documented on the page that should document it well. It does seem to go against the grain of one line per command line flag though.
bors
added a commit
that referenced
this pull request
Oct 18, 2018
Rollup of 18 pull requests Successful merges: - #54646 (improve documentation on std::thread::sleep) - #54933 (Cleanup the rest of codegen_llvm) - #54964 (Run both lldb and gdb tests) - #55016 (Deduplicate some code and compile-time values around vtables) - #55031 (Improve verify_llvm_ir config option) - #55050 (doc std::fmt: the Python inspiration is already mentioned in precedin…) - #55077 (rustdoc: Use dyn keyword when rendering dynamic traits) - #55080 (Detect if access to localStorage is forbidden by the user's browser) - #55090 (regression test for move out of borrow via pattern) - #55102 (resolve: Do not skip extern prelude during speculative resolution) - #55104 (Add test for #34229) - #55111 ([Rustc Book] Explain --cfg's arguments) - #55122 (Cleanup mir/borrowck) - #55127 (Remove HybridBitSet::dummy) - #55128 (Fix LLVMRustInlineAsmVerify return type mismatch) - #55142 (miri: layout should not affect CTFE checks (outside of validation)) - #55151 (Cleanup nll) - #55161 ([librustdoc] Disable spellcheck for search field)
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I removed this from the reference since it's rustc specific, and noticed it wasn't well documented on the page that should document it well. It does seem to go against the grain of one line per command line flag though.
r? @GuillaumeGomez