curve: add doc(hidden) to serial backend modules (#568)

We have a lot of backend types leaking via the public API, including
e.g. `FieldElement51`:

https://docs.rs/curve25519-dalek/latest/curve25519_dalek/backend/serial/u64/field/struct.FieldElement51.html

At the very least, these types shouldn't be visible in the rustdoc.

This PR hides them from the docs, but ideally we would hide them
completely from the public API (which might technically be considered a
breaking change, but IMO leaking them at all is a bug).
This commit is contained in:
Tony Arcieri 2023-08-28 00:38:11 -06:00 committed by GitHub
parent 594b1f9ffe
commit 60dd3100c0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -24,17 +24,21 @@ cfg_if! {
if #[cfg(curve25519_dalek_backend = "fiat")] {
#[cfg(curve25519_dalek_bits = "32")]
#[doc(hidden)]
pub mod fiat_u32;
#[cfg(curve25519_dalek_bits = "64")]
#[doc(hidden)]
pub mod fiat_u64;
} else {
#[cfg(curve25519_dalek_bits = "32")]
#[doc(hidden)]
pub mod u32;
#[cfg(curve25519_dalek_bits = "64")]
#[doc(hidden)]
pub mod u64;
}