Repository navigation
fix(0.16.2): docs.rs build — doc_auto_cfg removed in 1.92, use doc_cfg - #50
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_cfgfeature, which Rust removed in 1.92.0 and merged intodoc_cfg(rust-lang/rust#138907). docs.rs builds on nightly, so the crate root fails to compile witherror[E0557]: feature has been removed.The failure is invisible to everything this repository runs. The attribute sits inside
cfg_attr(docsrs, ...), anddocsrsis set by docs.rs and by nothing else, so every stablecargo doccompiles the crate without reaching the line — and without a warning. That is why two consecutive releases shipped it.The change
doc_cfgperforms the automatic per-item labelling itself since the merge, so nothing is lost — the rendered HTML still carries "Available on crate featurexonly" forbarcode,docx,media,pdf,pptxandxlsx.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:
RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --all-features --no-deps, pre-fixerror[E0557]atsrc/lib.rs:220:29— the docs.rs error verbatimcargo testcargo clippy --all-targets -- -D warnings/cargo fmt --checkcargo treecargo packageToolchain 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 docsrsdocs job is the obvious follow-up and is deliberately left for a release that can carry a workflow change.