Skip to content

fix(0.16.2): docs.rs build — doc_auto_cfg removed in 1.92, use doc_cfg - #50

Merged
aakashpawar1999 merged 1 commit into
developfrom
feat/0.16.2
Jul 28, 2026
Merged

aakashpawar1999 merged 1 commit into
developfrom
feat/0.16.2

Conversation

@aakashpawar1999

Copy link
Copy Markdown
Contributor

docs.rs has no page for 0.16.0 or 0.16.1. Both fail to build there: the crate root enables the nightly doc_auto_cfg feature, which Rust removed in 1.92.0 and merged into doc_cfg (rust-lang/rust#138907). docs.rs builds on nightly, so the crate root fails to compile with error[E0557]: feature has been removed.

The failure is invisible to everything this repository runs. The attribute sits inside cfg_attr(docsrs, ...), and docsrs is set by docs.rs and by nothing else, so every stable cargo doc compiles the crate without reaching the line — and without a warning. That is why two consecutive releases shipped it.

The change

-#![cfg_attr(docsrs, feature(doc_auto_cfg))]
+#![cfg_attr(docsrs, feature(doc_cfg))]

doc_cfg performs the automatic per-item labelling itself since the merge, so nothing is lost — the rendered HTML still carries "Available on crate feature x only" for barcode, docx, media, pdf, pptx and xlsx.

0.16.0 and 0.16.1 stay unbuildable on docs.rs; a published version's sources cannot be changed. 0.16.2 is the first version of the 0.16 line with documentation.

Verification

Against the configuration that actually failed, with a negative control:

Check Result
RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --all-features --no-deps, pre-fix fails, error[E0557] at src/lib.rs:220:29 — the docs.rs error verbatim
same command, post-fix exit 0, no warnings; feature labels present in the rendered HTML
cargo test 603 passed, 0 failed
five 0.16.0 checkers changelog 5/5, docs_drift 10/10, guide_pages 7/7, public_api 9/9, readme 8/8 — no test edited
cargo clippy --all-targets -- -D warnings / cargo fmt --check exit 0
public-surface diff / cargo tree empty / 401 lines
cargo package 118 files, 564 KiB, verification build exit 0

Toolchain for the docs checks: rustc 1.99.0-nightly (09ee43b2d 2026-07-27) — after 1.92.0, so the control is not vacuous. MSRV unchanged at 1.88; no consumer needs nightly.

No public item added, renamed, or removed and no behaviour differs. Includes the sealed 0.16.2 UltraShip record, pinned in releases.lock.

Known limitation carried forward: nothing in this repository can catch the next occurrence — no local or CI command builds the failing configuration. A nightly --cfg docsrs docs job is the obvious follow-up and is deliberately left for a release that can carry a workflow change.

docs.rs has no page for 0.16.0 or 0.16.1. Both fail to build there: the
crate root enables the nightly `doc_auto_cfg` feature, removed in Rust
1.92.0 and merged into `doc_cfg` (rust-lang/rust#138907). docs.rs builds
on nightly, so the crate root fails to compile with `error[E0557]:
feature has been removed`.

The failure is invisible to everything this repository runs. The
attribute sits inside `cfg_attr(docsrs, ...)`, and `docsrs` is set by
docs.rs and by nothing else, so every stable `cargo doc` compiles the
crate without reaching the line — and without a warning. That is why two
consecutive releases shipped it, and why the verification here is a
nightly build with `--cfg docsrs` rather than a command that had already
passed: it fails on the pre-fix tree and passes on the post-fix one.

`doc_cfg` performs the automatic per-item labelling itself since the
merge, so nothing is lost: the rendered HTML still carries "Available on
crate feature `x` only" for barcode, docx, media, pdf, pptx and xlsx.

0.16.0 and 0.16.1 stay unbuildable on docs.rs — a published version's
sources cannot be changed — so 0.16.2 is the first version of the 0.16
line with documentation.

No public item is added, renamed, or removed and no behaviour differs.
603 tests pass, the five checkers stay green with no test edited, clippy
and fmt exit 0, the public-surface diff is empty, and `cargo tree` holds
at 401 lines. Includes the sealed 0.16.2 release record, pinned.
@aakashpawar1999
aakashpawar1999 merged commit 1150558 into develop Jul 28, 2026
10 checks passed
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.

1 participant