You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.
The crate documentation for solana_sdk lists duplicate modules for entrypoint, feature, and many other items. This arises because solana_sdk is glob-reexporting solana_program::* but also redefining several of the items within that crate. Rust callers only see the redefinitions but due to a bug (rust-lang/rust#60522) in rustdoc, the documentation shows two definitions.
Clicking either definition leads to the same page. The linked issue indicates that whether rustdoc shows the reexport or the redefinition is non-deterministic, but so far I have only seen rustdoc show the redefinitions in this case.
Proposed Solution
While fixing the bug upstream would be best, I intend to just add #[doc(hidden)] to the redefinitions to work around the problem.
The text was updated successfully, but these errors were encountered:
After looking into this a bit more I think using #[doc(hidden)] here will just make a bigger mess. I am seeing that sometimes rustdoc generates the correct docs, for the duplicated solana_sdk modules, and sometimes the incorrect docs, for the imported solana_program modules. It's pretty confusing. It would be best to try to fix this upstream, and if not, to change the * imports to enumerate every import explicitly.
Problem
The crate documentation for solana_sdk lists duplicate modules for
entrypoint
,feature
, and many other items. This arises because solana_sdk is glob-reexportingsolana_program::*
but also redefining several of the items within that crate. Rust callers only see the redefinitions but due to a bug (rust-lang/rust#60522) in rustdoc, the documentation shows two definitions.Clicking either definition leads to the same page. The linked issue indicates that whether rustdoc shows the reexport or the redefinition is non-deterministic, but so far I have only seen rustdoc show the redefinitions in this case.
Proposed Solution
While fixing the bug upstream would be best, I intend to just add
#[doc(hidden)]
to the redefinitions to work around the problem.The text was updated successfully, but these errors were encountered: