From 8e10ea68296c8ba6b4f6fddb445522d4b5281084 Mon Sep 17 00:00:00 2001 From: "Havvy (Ryan Scheel)" Date: Mon, 15 Oct 2018 21:35:56 -0700 Subject: [PATCH 1/2] [Rustc Book] Explain --cfg's arguments --- src/doc/rustc/src/command-line-arguments.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/doc/rustc/src/command-line-arguments.md b/src/doc/rustc/src/command-line-arguments.md index e2b001832fe..ea3277b1320 100644 --- a/src/doc/rustc/src/command-line-arguments.md +++ b/src/doc/rustc/src/command-line-arguments.md @@ -10,6 +10,11 @@ This flag will print out help information for `rustc`. This flag can turn on or off various `#[cfg]` settings. +The value can either be a single identifier or two identifiers separated by `=`. + +For examples, `--cfg 'verbose'` or `--cfg 'feature=serde'`. These correspond +to `#[cfg(verbose)]` and `#[cfg(feature = "serde")]` respectively. + ## `-L`: add a directory to the library search path When looking for external crates, a directory passed to this flag will be searched. From 8c186af538218aaac40572bff64f0032ba968dbd Mon Sep 17 00:00:00 2001 From: "Havvy (Ryan Scheel)" Date: Tue, 16 Oct 2018 00:13:05 -0700 Subject: [PATCH 2/2] [Rustc Book] Quotes around value in --cfg example --- src/doc/rustc/src/command-line-arguments.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doc/rustc/src/command-line-arguments.md b/src/doc/rustc/src/command-line-arguments.md index ea3277b1320..b60c5524014 100644 --- a/src/doc/rustc/src/command-line-arguments.md +++ b/src/doc/rustc/src/command-line-arguments.md @@ -12,7 +12,7 @@ This flag can turn on or off various `#[cfg]` settings. The value can either be a single identifier or two identifiers separated by `=`. -For examples, `--cfg 'verbose'` or `--cfg 'feature=serde'`. These correspond +For examples, `--cfg 'verbose'` or `--cfg 'feature="serde"'`. These correspond to `#[cfg(verbose)]` and `#[cfg(feature = "serde")]` respectively. ## `-L`: add a directory to the library search path