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

Switch to doc_auto_cfg #1305

Merged
merged 3 commits into from
Sep 22, 2023
Merged

Switch to doc_auto_cfg #1305

merged 3 commits into from
Sep 22, 2023

Conversation

pitdicker
Copy link
Collaborator

Since end 2021 docs.rs can make use of the doc_auto_cfg.
With it we can remove all the #[cfg_attr(docsrs, doc(cfg(feature = "...")))] lines.

Like the doc_cfg feature we used until now it is only available on nightly.

I also switched the arbitrary and unstable-locales features to visible on docs.rs.

Can be tested locally with:

RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --features=serde,rkyv,unstable-locales,arbitrary

@codecov
Copy link

codecov bot commented Sep 21, 2023

Codecov Report

Merging #1305 (6e095e3) into 0.4.x (c4fc4c4) will decrease coverage by 0.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##            0.4.x    #1305      +/-   ##
==========================================
- Coverage   91.36%   91.35%   -0.01%     
==========================================
  Files          38       38              
  Lines       17042    17034       -8     
==========================================
- Hits        15570    15562       -8     
  Misses       1472     1472              
Files Changed Coverage Δ
src/date.rs 35.86% <ø> (ø)
src/datetime/mod.rs 86.25% <ø> (ø)
src/datetime/rustc_serialize.rs 92.72% <ø> (ø)
src/datetime/serde.rs 87.56% <ø> (ø)
src/format/formatting.rs 94.75% <ø> (ø)
src/format/mod.rs 85.04% <ø> (ø)
src/format/strftime.rs 98.94% <ø> (ø)
src/lib.rs 95.58% <ø> (ø)
src/month.rs 75.29% <ø> (ø)
src/naive/date.rs 96.30% <ø> (ø)
... and 9 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@pitdicker
Copy link
Collaborator Author

I have removed RUSTFLAGS="--cfg docsrs" from the cargo-deadlinks lint, and made the lint check all features.
The cfg does not influence the links anyway, and can run on stable.

@pitdicker pitdicker merged commit c892679 into chronotope:0.4.x Sep 22, 2023
37 checks passed
@pitdicker pitdicker deleted the doc_auto_cfg branch September 22, 2023 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants