feat(ci): build and check rustdocs for warnings; fix(docs): add missing cfg flag to allow displaying features on doc.rs, fix various warnings #998
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.
📬 Issue #, if available:
n/a
✍️ Description of changes:
Fix for: https://docs.rs/crate/lambda_runtime/0.14.0/builds/2162130
We want to display the feature gates on items in
docs.rs
. However, we were missing the crate-level#![cfg_attr(docsrs, feature(doc_cfg))]
necessary to do so.This made it through our CI since we don't build/validate docs. Adding that in.
I structured it as a standalone step since docs.rs target only builds on the nightly branch. I just tossed all the crates into it rather than segmenting - there are cross-crate doc linking interdependencies, and anyway it's a quick step.
This required fixing a TON of docs warnings since I have the step configured to fail on warnings (broken doc links, etc).
Testing
It's passing on my branch's CI: https://github.com/jlizen/aws-lambda-rust-runtime/actions/runs/15281293634/job/42980737800
Also the regular builds are still passing.
🔏 By submitting this pull request
cargo +nightly fmt
.cargo clippy --fix
.