fix(doc): syntax of rustc-check-cfg instruction#13573
fix(doc): syntax of rustc-check-cfg instruction#13573birkenfeld wants to merge 1 commit intorust-lang:masterfrom
rustc-check-cfg instruction#13573Conversation
Remove the extra colon, and change the example to something that is actually valid.
|
r? @weihanglo rustbot has assigned @weihanglo. Use r? to explicitly pick a reviewer |
|
The new two-colons syntax is valid in the current beta and nightly, and will be available in 1.77.0. The old one-colon syntax is still supported for compatibility reasons. See #12201 |
|
Oh I see! Sorry. Do you want to keep the other change? |
|
The stabilization PR of it is #13571. I would recommend adding a comment there for doc improvements. |
|
|
||
| ```rust,no_run | ||
| // build.rs | ||
| println!("cargo::rustc-check-cfg=cfg(foo, bar)"); |
There was a problem hiding this comment.
Btw, this is valid; this defines two different cfgs foo and bar, not one foo="bar".
But I agree this isn't the best example.
|
Going to close this as the PR author of #13571 is aware of the example improvement. Thank you all :) |
Remove the extra colon, and change the example to something that is actually valid.