-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Description
The #[doc(hidden)]
attribute allows to hide items from the rendered documentation generated by rustdoc (with some subtleties regarding re-exports).
It is my opinion that this excludes the decorated item from the crate's SemVer commitment.
This opinion seems to be shared by rust-analyzer, where such items have been excluded from the auto-completion mechanism (rust-lang/rust-analyzer#9719, rust-lang/rust-analyzer#15473). Additionally, cargo-semver-checks also worked on taking into account this attribute when checking for breaking changes.
However, the Cargo reference regarding SemVer only states that removing/renaming pub
items is a major change, making no difference for #[doc(hidden)]
items.
Is there an official stance on the compatibility guarantees of #[doc(hidden)]
pub
items and, if so, should the reference be updated?