Skip to content

Commit 1c09006

Browse files
committed
Rollup merge of #55111 - Havvy:rustc-book-cfg-examples, r=GuillaumeGomez
[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.
2 parents 7d21252 + 8c186af commit 1c09006

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/doc/rustc/src/command-line-arguments.md

+5
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ This flag will print out help information for `rustc`.
1010

1111
This flag can turn on or off various `#[cfg]` settings.
1212

13+
The value can either be a single identifier or two identifiers separated by `=`.
14+
15+
For examples, `--cfg 'verbose'` or `--cfg 'feature="serde"'`. These correspond
16+
to `#[cfg(verbose)]` and `#[cfg(feature = "serde")]` respectively.
17+
1318
## `-L`: add a directory to the library search path
1419

1520
When looking for external crates, a directory passed to this flag will be searched.

0 commit comments

Comments
 (0)