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

Add more documentation to cargo::rustc-check-cfg #13869

Merged
merged 3 commits into from
May 6, 2024

Conversation

Urgau
Copy link
Member

@Urgau Urgau commented May 6, 2024

This PR add more documentation to cargo::rustc-check-cfg by:

  1. mentioning cargo:rustc-check-cfg for MSRV
  2. it also add a link to the check-cfg blog post (since it gives a big overview of the feature in general)
  3. it also adds a link to the build-script-examples page where a more complete example for the use of cargo::rustc-cfg and cargo::rustc-check-cfg is displayed

Fixes #13868
r? @weihanglo

@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 May 6, 2024
src/doc/src/reference/build-scripts.md Outdated Show resolved Hide resolved
src/doc/src/reference/build-scripts.md Outdated Show resolved Hide resolved
@@ -288,6 +292,7 @@ if foo_bar_condition {
}
Copy link
Member

Choose a reason for hiding this comment

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

Unrelated to this PR. Instead of putting an example here, do you think it's better to just have a link to the conditional compilation build script example?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think having a example right in the documentation is very valuable, however linking to a more complete example is quite valuable to, so I added a link to it.

@weihanglo
Copy link
Member

@bors r+

Thanks!

@bors
Copy link
Collaborator

bors commented May 6, 2024

📌 Commit 1ddc6b6 has been approved by weihanglo

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 6, 2024
@bors
Copy link
Collaborator

bors commented May 6, 2024

⌛ Testing commit 1ddc6b6 with merge ec35bff...

@bors
Copy link
Collaborator

bors commented May 6, 2024

☀️ Test successful - checks-actions
Approved by: weihanglo
Pushing ec35bff to master...

@bors bors merged commit ec35bff into rust-lang:master May 6, 2024
21 checks passed
bors added a commit to rust-lang-ci/rust that referenced this pull request May 8, 2024
Update cargo

10 commits in 05364cb2f61a2c2b091e061c1f42b207dfb5f81f..0ca60e940821c311c9b25a6423b59ccdbcea218f
2024-05-03 16:48:59 +0000 to 2024-05-08 01:54:25 +0000
- chore: Add cargo-lints to unstable docs (rust-lang/cargo#13881)
- test: clean up unnecessary uses of `match_exact` (rust-lang/cargo#13879)
- docs(ref): Correct heading level of `[lints]` documentation (rust-lang/cargo#13878)
- Fix: Build only the specified artifact library when multiple types are available (rust-lang/cargo#13842)
- docs: add missing CARGO_MAKEFLAGS env for plugins (rust-lang/cargo#13872)
- Add more documentation to `cargo::rustc-check-cfg` (rust-lang/cargo#13869)
- fix(toml): Remove unstable rejrected frontmatter syntax for cargo script (rust-lang/cargo#13861)
- Update UI example code in contributor guide (rust-lang/cargo#13864)
- style(test): Remove check-cfg warning (rust-lang/cargo#13865)
- Fix global_cache_tracker::max_download_size test flakiness (rust-lang/cargo#13860)

r? ghost
@rustbot rustbot added this to the 1.80.0 milestone May 8, 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cargo:: syntax should be permitted despite MSRV with the right configuration
4 participants