From ba9b4aef24630136ec95a2ee085899d43158b500 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Mon, 11 Mar 2024 12:49:15 +0100 Subject: [PATCH] fix(doc): syntax of `rustc-check-cfg` instruction Remove the extra colon, and change the example to something that is actually valid. --- src/doc/src/reference/unstable.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/doc/src/reference/unstable.md b/src/doc/src/reference/unstable.md index b9bead0eed9..e0769db917a 100644 --- a/src/doc/src/reference/unstable.md +++ b/src/doc/src/reference/unstable.md @@ -1141,7 +1141,7 @@ You can use the flag like this: cargo check -Z unstable-options -Z check-cfg ``` -### `cargo::rustc-check-cfg=CHECK_CFG` +### `cargo:rustc-check-cfg=CHECK_CFG` The `rustc-check-cfg` instruction tells Cargo to pass the given value to the `--check-cfg` flag to the compiler. This may be used for compile-time @@ -1157,7 +1157,8 @@ You can use the instruction like this: ```rust,no_run // build.rs -println!("cargo::rustc-check-cfg=cfg(foo, bar)"); +println!("cargo:rustc-check-cfg=cfg(foo)"); +println!("cargo:rustc-check-cfg=cfg(bar, values(\"first\", \"second\"))"); ``` ```