Skip to content

fix cargo doc E0080 on MSRV 1.85 (p256/p384/p521/sm2/k256) - #1910

Open
Warfront1 wants to merge 1 commit into
RustCrypto:masterfrom
Warfront1:feat/fix-doc-e0080-rust140653
Open

fix cargo doc E0080 on MSRV 1.85 (p256/p384/p521/sm2/k256)#1910
Warfront1 wants to merge 1 commit into
RustCrypto:masterfrom
Warfront1:feat/fix-doc-e0080-rust140653

Conversation

@Warfront1

@Warfront1 Warfront1 commented Jul 30, 2026

Copy link
Copy Markdown

Fixes #1909.

cargo doc fails on the published p256/p384/p521/sm2/k256 0.14.x crates when building with Rust 1.85-1.89 (E0080 at src/arithmetic/tables.rs).

This adds #[doc(hidden)] to the offending associated const in all five affected crates (p256, p384, p521, sm2, k256).
Hiding the const from rustdoc prevents the const evaluator from running on it, resolving E0080 while keeping MSRV 1.85.
The const remains usable at runtime; only its doc rendering is suppressed.

docker run --rm rust:1.85.0 bash -c '
  apt-get update -qq && apt-get install -y -qq git >/dev/null
  git clone --depth 1 --branch feat/fix-doc-e0080-rust140653 https://github.com/Warfront1/elliptic-curves.git /repo
  cd /repo
  cargo doc --workspace --all-features
'

The underlying rustc issue (rust-lang/rust#140653) is fixed in Rust 1.90 (rust-lang/rust#140942).
When MSRV is bumped to 1.90, this #[doc(hidden)] workaround can be removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cargo doc fails with E0080

1 participant