Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(doc): syntax of rustc-check-cfg instruction #13573

Closed
wants to merge 1 commit into from

Conversation

birkenfeld
Copy link
Contributor

Remove the extra colon, and change the example to something that is actually valid.

Remove the extra colon, and change the example to something that is actually valid.
@rustbot
Copy link
Collaborator

rustbot commented Mar 11, 2024

r? @weihanglo

rustbot has assigned @weihanglo.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-documenting-cargo-itself Area: Cargo's documentation S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 11, 2024
@weihanglo
Copy link
Member

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

@birkenfeld
Copy link
Contributor Author

Oh I see! Sorry. Do you want to keep the other change?

@weihanglo
Copy link
Member

The stabilization PR of it is #13571. I would recommend adding a comment there for doc improvements.

@@ -1157,7 +1157,8 @@ You can use the instruction like this:

```rust,no_run
// build.rs
println!("cargo::rustc-check-cfg=cfg(foo, bar)");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@weihanglo
Copy link
Member

Going to close this as the PR author of #13571 is aware of the example improvement. Thank you all :)

@weihanglo weihanglo closed this Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-documenting-cargo-itself Area: Cargo's documentation S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants