Skip to content

Commit 8e10ea6

Browse files
committed
[Rustc Book] Explain --cfg's arguments
1 parent 46880f4 commit 8e10ea6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
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)