Skip to content

Replace doc_auto_cfg with doc_cfg to allow docsrs build to succeed#4331

Merged
aws-sdk-rust-ci merged 3 commits intomainfrom
landonxjames/docbuild
Oct 6, 2025
Merged

Replace doc_auto_cfg with doc_cfg to allow docsrs build to succeed#4331
aws-sdk-rust-ci merged 3 commits intomainfrom
landonxjames/docbuild

Conversation

@landonxjames
Copy link
Contributor

@landonxjames landonxjames commented Oct 3, 2025

Motivation and Context

Our docrs builds started failing recently with the error:

[INFO] [stderr]  Documenting aws-sdk-dynamodb v1.94.0 (/opt/rustwide/workdir)
[INFO] [stderr] error[E0557]: feature has been removed
[INFO] [stderr]   --> src/lib.rs:21:29
[INFO] [stderr]    |
[INFO] [stderr] 21 | #![cfg_attr(docsrs, feature(doc_auto_cfg))]
[INFO] [stderr]    |                             ^^^^^^^^^^^^ feature has been removed
[INFO] [stderr]    |
[INFO] [stderr]    = note: removed in CURRENT_RUSTC_VERSION; see <https://github.com/rust-lang/rust/pull/138907> for more information
[INFO] [stderr]    = note: merged into `doc_cfg`
[INFO] [stderr] 
[INFO] [stderr] error: Compilation failed, aborting rustdoc
[INFO] [stderr] 
[INFO] [stderr] For more information about this error, try `rustc --explain E0557`.
[INFO] [stderr] error: could not document `aws-sdk-dynamodb`

The linked issue shows that doc_auto_cfg has recently been merged into doc_cfg. docsrs builds with the latest nightly toolchain, so the change has impacted our doc builds. This PR makes that change in codegen and in all of our runtime crates.

Checklist

  • For changes to the smithy-rs codegen or runtime crates, I have created a changelog entry Markdown file in the .changelog directory, specifying "client," "server," or both in the applies_to key.
  • For changes to the AWS SDK, generated SDK code, or SDK runtime crates, I have created a changelog entry Markdown file in the .changelog directory, specifying "aws-sdk-rust" in the applies_to key.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@github-actions
Copy link

github-actions bot commented Oct 3, 2025

@landonxjames landonxjames marked this pull request as ready for review October 6, 2025 16:09
@landonxjames landonxjames requested review from a team as code owners October 6, 2025 16:09
@github-actions
Copy link

github-actions bot commented Oct 6, 2025

@aws-sdk-rust-ci aws-sdk-rust-ci merged commit eb261a4 into main Oct 6, 2025
50 checks passed
@aws-sdk-rust-ci aws-sdk-rust-ci deleted the landonxjames/docbuild branch October 6, 2025 17:27
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