Skip to content

replace use of doc_auto_cfg, doc_cfg_hide features with doc_cfg#24

Merged
jhpratt merged 1 commit into
jhpratt:mainfrom
iamjpotts:jp/nightly-docs-removed-feature
Oct 25, 2025
Merged

replace use of doc_auto_cfg, doc_cfg_hide features with doc_cfg#24
jhpratt merged 1 commit into
jhpratt:mainfrom
iamjpotts:jp/nightly-docs-removed-feature

Conversation

@iamjpotts
Copy link
Copy Markdown
Contributor

Resolves this error, which started with nightly-2025-09-28 (current nightly). The error does not reproduce on nightly-2025-09-27.

RUSTDOCFLAGS='-Dwarnings --cfg=docsrs' cargo doc --document-private-items
 Documenting deranged v0.5.4 (./deranged/deranged)
error[E0557]: feature has been removed
 --> deranged/src/lib.rs:3:29
  |
3 | #![cfg_attr(docsrs, feature(doc_auto_cfg, doc_cfg_hide))]
  |                             ^^^^^^^^^^^^ feature has been removed
  |
  = note: removed in 1.58.0; see <https://github.com/rust-lang/rust/pull/138907> for more information
  = note: merged into `doc_cfg`

error[E0557]: feature has been removed
 --> deranged/src/lib.rs:3:43
  |
3 | #![cfg_attr(docsrs, feature(doc_auto_cfg, doc_cfg_hide))]
  |                                           ^^^^^^^^^^^^ feature has been removed
  |
  = note: removed in 1.57.0; see <https://github.com/rust-lang/rust/pull/138907> for more information
  = note: merged into `doc_cfg`

error: Compilation failed, aborting rustdoc

For more information about this error, try `rustc --explain E0557`.
error: could not document `deranged`

PR linked in error message:
rust-lang/rust#138907

Similar change made to rattatui in last few hours:
ratatui/ratatui#2103

Signed-off-by: Joshua Potts <8704475+iamjpotts@users.noreply.github.com>
@jhpratt
Copy link
Copy Markdown
Owner

jhpratt commented Sep 29, 2025

While this PR is trivial, I don't have the time to handle this and other crates at the moment. I'm surprised that this is an error and not a warning, though.

@robamu
Copy link
Copy Markdown

robamu commented Sep 30, 2025

It is a bit unfortunate that this is an error. It propagates to the documentation build of a lot of other crates unfortunately (through the time crate in my case)

@jhpratt
Copy link
Copy Markdown
Owner

jhpratt commented Oct 1, 2025

Until I have the time to handle this, the simplest solution is to simply not pass --cfg docsrs.

@robamu
Copy link
Copy Markdown

robamu commented Oct 2, 2025

For local builds, this works. But the docs.rs builds will probably fail if any dependency uses the obsolete feature.

UPDATE: I do not think this is an issue for docs.rs builds. They simply refer to the already built documentation of released creates/

@jhpratt jhpratt merged commit b627125 into jhpratt:main Oct 25, 2025
5 checks passed
@iamjpotts iamjpotts deleted the jp/nightly-docs-removed-feature branch October 26, 2025 14:58
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.

3 participants