I'm the author of WinSafe crate. When generating its documentation, I always used doc_auto_cfg to tag the items which depend on cargo features, but currently the documentation is broken:
error[E0557]: feature has been removed
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
^^^^^^^^^^^^ feature has been removed
note: merged into `doc_cfg`
I am not familiar with its exact behavior, but I believe the feature flag change is just that doc_cfg and doc_auto_cfg are now combined; that is, doc_cfg now also enables the functionality doc_auto_cfg used to enable.
The change in output you are seeing, then, must be a bug in the auto cfg functionality. You should create a test case and report the bug.
As a workaround, you can try using the explicit #[doc(cfg)] to tell rustdoc what it should display:
We're in February and doc_cfg is still broken, unfortunately.
So I found a temporary way to build the docs using the deceased doc_auto_cfg: using the last nightly channel which supported it: nightly-2025-09-27 (1.92.0).
How did I find that? Through pain.
This is the command line I'm using to build my docs:
I'm trying to figure out how to enable building docs so the features items require show up like in this post, and it's unclear to me how this is supposed to work. Some advice online points to the now removed doc_auto_cfg.
It's still an unstable feature, though it looks like it's on the path to stabilization. I expect its documentation to improve once it has stabilized.
The doc_auto_cfg is the "old" way to do it and is unavailable in more recent nightly builds. You should be using the doc_cfg feature nowadays. However, even if you do that, you can still run into problems due to dependencies still using doc_auto_cfg.
From my experience, most crates seem to have switched to doc_cfg, but it's not always the case that cargo will use updated crate. Using cargo update --dry-run --verbose you can see if crate upgrades are being held back due to MSRV constraints. If you run into doc_auto_cfg being unrecognized, then bump your rust-version to fulfill the requirements
I didn't realize I had to tag my items individually. Is there no way too avoid this, it seems awfully redundant and error-prone, when I want to apply this to every item with a feature in the project. I can see wanting the ability to hide the feature notice for default features, or special cases, but I don't want that at the moment.
Also looks like I'm stuck until generic-array updates.
No, you do not have to tag items individually. The functionality of doc_auto_cfg is not gone; it is just part of doc_cfg now. With feature(doc_cfg), you get both automatic tagging and the ability to override it.
Sorry, I should have been clear: As @kpreid said, you do not need to do that. If you read the top of the thread, there appears to be a bug that causes some items to not be handled properly -- tagging them explicitly works around the problem.
This may be a crate that is held back due to a MSRV constraint. Are you using Edition 2024? If you run cargo update --dry-run --verbose, does it tell you that there are crates being held back due to MSRV?