Conversation
docs.rs has failed to build `containerd-shim` since v0.7.0 (0.6.0 is the
last release with published docs):
error[E0658]: `#[doc(cfg)]` is experimental
--> src/lib.rs:77:32
|
77 | #[cfg_attr(docsrs, doc(cfg(not(feature = "async"))))]
`doc(cfg)` requires `#![feature(doc_cfg)]` at the crate root, which was
never added. docs.rs is the only place that builds with `--cfg docsrs`,
so the attribute activates there and nowhere else, and every local and
CI build kept passing.
- Add `#![cfg_attr(docsrs, feature(doc_cfg))]` to the shim crate root.
This fixes the broken docs publishing.
- Replace our own `docs` feature with the `docsrs` cfg that docs.rs
sets automatically [1]. Both gated the same thing, the README
include, so there is no reason to carry a second toggle for it. The
`[package.metadata.docs.rs]` blocks go away with it.
Both doc jobs now run on nightly with `--cfg docsrs`, matching what
docs.rs actually invokes, so this cannot regress unnoticed again.
[1] https://docs.rs/about/builds
jokemanfire
approved these changes
Sep 4, 2026
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 failed to build
containerd-shimsince v0.7.0 (0.6.0 is the last release with published docs):doc(cfg)requires#![feature(doc_cfg)]at the crate root, which was never added. docs.rs is the only place that builds with--cfg docsrs, so the attribute activates there and nowhere else, and every local and CI build kept passing.Add
#![cfg_attr(docsrs, feature(doc_cfg))]to the shim crate root. This fixes the broken docs publishing.Replace our own
docsfeature with thedocsrscfg that docs.rs sets automatically [1]. Both gated the same thing, the README include, so there is no reason to carry a second toggle for it. The[package.metadata.docs.rs]blocks go away with it.Both doc jobs now run on nightly with
--cfg docsrs, matching what docs.rs actually invokes, so this cannot regress unnoticed again.[1] https://docs.rs/about/builds